recentpopularlog in


« earlier   
ruby - net-ldap create user with password - Stack Overflow
ef add(first_name, last_name, username)
dn = dn_value

attrs = {
:objectclass => ["top", "person", "organizationalPerson", "user"],
:cn => fullname(first_name, last_name),
:sn => last_name.capitalize,
:givenname => first_name.capitalize,
:displayname => fullname(first_name, last_name),
:name => fullname(first_name, last_name),
:samaccountname => username,
:unicodePwd => '"password"'.encode("utf-16")
@client.add(:dn => dn, :attributes => attrs)

if @client.get_operation_result.code != 0
puts "Failed to add user #{fullname(first_name, last_name)}"
puts "Added user #{fullname(first_name, last_name)}"
def encode_passwd(string)
newstring = ""
string = "\"" + string + "\""
string.split("").each do |c|
newstring = "#{newstring}#{c}\000"
return newstring
unicodepwd = "\"#{plain_text_password}\"".encode(Encoding::UTF_16LE).force_encoding(Encoding::ASCII_8BIT)
Net::LDAP::Password.generate(:md5, 'yourPlaintextPass')
See details about the encoding here:
see also
ruby  activedirectory  code  example 
6 hours ago by some_hren
python - How do you split a list into evenly sized chunks? - Stack Overflow
Q: I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.

I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators. [...]
2008  forumthread  stackexchange  python  example  tips 
16 hours ago by ezequiel
The Anatomy of a Film Business Plan - Rodriques Law
Excellent explanation of a film business plan, section by section #kudos @rodriqueslaw #indie #film #investor
investor  business  plan  example  explanation  bullsi  reference  19eyz  finance  model  producer 
18 hours ago by csrollyson
Sophisticated Partitioning with CSS Grid | Rob Weychert
Create compelling grid patterns by harnessing specificity.
css  grid  example  article  layout 
21 hours ago by andrewn
LotteMakesStuff/SimplePhysicsDemo: A simple lil demo showing a jobified physics system
A simple lil demo showing a jobified physics system - LotteMakesStuff/SimplePhysicsDemo
c#  job  system  unity  example  github  project  physics  unity3d 
23 hours ago by olafyoorsen

Copy this bookmark:

to read