I hereby claim:
- I am itorres on github.
- I am itorres (https://keybase.io/itorres) on keybase.
- I have a public key whose fingerprint is 2CCB 85E6 8AEC C336 5ADF 1C14 A728 61BC 6411 65EA
To claim this, I am signing this object:
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); |
#!/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("'") |
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": |
function firefoxosdevicesIndex() { | |
var r = { 'd': {}, 's': {} }; | |
devices = document.querySelectorAll(".ag-device"); | |
for (var i = 0; i < devices.length; i++) { | |
var model = devices[i].querySelector(".ag-name").textContent.trim(); | |
var specs = devices[i].querySelectorAll("dt"); | |
r['d'][model] = {}; | |
for (var j = 0; j < specs.length; j++) { | |
var spec = specs[j].textContent.trim(), | |
value = specs[j].nextSibling.textContent.trim(); |
I hereby claim:
To claim this, I am signing this object:
# model: | |
# [Nov 4 12:26:52] NOTICE[416] chan_sip.c: Registration from '"x" <sip:[email protected]:5060>' failed for '1.2.3.4' - No matching peer found | |
awk '/failed for/ {count[$12]++}END{for (j in count) printf "%8i %s\n", count[j],j }' messages|sort -n |
#!/usr/bin/env python | |
import os | |
import sys | |
basedir = sys.argv[1] | |
for root, dirs, files in os.walk(basedir): | |
cmd = 'avconv -i "{infile}" -map 0:a -codec:a \ | |
opus -b:a 48k -vbr on "{outfile}"' | |
print "Visiting", root |
magellan:ownCloud$ owncloud --logfile - | |
03-17 00:00:25:862 101358 OCC::Application::setupLogging: "################## ownCloud ca_ES () 2.1.1" | |
03-17 00:00:25:862 101358 OCC::Application::setupTranslations: void OCC::Application::setupTranslations() Using "ca_ES" translation | |
03-17 00:00:25:864 101358 unknown: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-itorres' | |
03-17 00:00:25:864 101358 OCC::SocketApi::SocketApi: SocketApi: server started, listening at "/tmp/runtime-itorres/ownCloud/socket" | |
03-17 00:00:25:864 101358 OCC::FolderMan::FolderMan: setting remote poll timer interval to 30000 msec | |
03-17 00:00:25:945 101358 OCC::FolderMan::setupFolders: * Setup folders from settings file | |
03-17 00:00:25:945 101358 OCC::Folder::checkLocalPath: Checked local path ok | |
03-17 00:00:25:946 101358 OCC::FolderMan::addFolderInternal: Adding folder to Folder Map OCC::Folder(0x812677c00) | |
03-17 00:00:25:946 101358 OCC::FolderWatcherPrivate::slotAddFolderRecursive: (+) Watcher: "/usr/home/itorres/ownCloud |
magellan:~$ owncloud --logfile - | |
03-17 00:04:41:709 101382 OCC::Application::setupLogging: "################## ownCloud ca_ES () 2.1.1" | |
03-17 00:04:41:709 101382 OCC::Application::setupTranslations: void OCC::Application::setupTranslations() Using "ca_ES" translation | |
03-17 00:04:41:711 101382 unknown: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-itorres' | |
03-17 00:04:41:712 101382 OCC::SocketApi::SocketApi: SocketApi: server started, listening at "/tmp/runtime-itorres/ownCloud/socket" | |
03-17 00:04:41:712 101382 OCC::FolderMan::FolderMan: setting remote poll timer interval to 30000 msec | |
03-17 00:04:41:841 101382 OCC::FolderMan::setupFolders: * Setup folders from settings file | |
03-17 00:04:41:841 101382 OCC::Folder::checkLocalPath: Checked local path ok | |
03-17 00:04:41:842 101382 OCC::FolderMan::addFolderInternal: Adding folder to Folder Map OCC::Folder(0x812677c00) |
(defun my-rename-shell-buffer () | |
"Rename the current shell buffer name." | |
(interactive) | |
(let ((candidate-name | |
(concat | |
(if (string-prefix-p "/ssh:" default-directory) | |
(concat tramp-current-host ":") | |
"") | |
(file-name-base (directory-file-name default-directory))))) | |
(rename-buffer (format "*shell* <%s>" candidate-name)))) |