This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getopt(wat,default=None): | |
""" | |
getopt("flag") returns a bool | |
getopt("flag","default value") returns the next item in the argument list | |
Examples: | |
when calling "script -f filename": | |
getopt("-f","defaultname") would return "filename" | |
getopt("-v") would return False | |
when calling "script -v": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# Configure Solarized (http://ethanschoonover.com/solarized) in | |
# Gnome Terminal 3.8 | |
# | |
# Hacked away in a lazy summer afternoon by http://ignacio.torresmasdeu.name/ | |
profile_dir="/org/gnome/terminal/legacy/profiles" | |
default_profile=`gsettings get org.gnome.Terminal.ProfilesList default`.strip.delete("'") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var crypto = require('crypto'); | |
/* | |
* node.js ssha hash generation and check functions intended for use with LDAP servers. | |
*/ | |
function ssha(cleartext, salt) { | |
var sum = crypto.createHash('sha1'); | |
( typeof(salt) == 'undefined') ? salt = new Buffer(crypto.randomBytes(20)).toString('base64') : salt = salt; | |
sum.update(cleartext); |
NewerOlder