I hereby claim:
- I am insom on github.
- I am insom (https://keybase.io/insom) on keybase.
- I have a public key whose fingerprint is 30D9 81E4 DEB1 FF5D 8CAA D832 8CCE 2412 3B8F 78F8
To claim this, I am signing this object:
(cextensionvenv)% python test.py | |
{u'foo': [u'bar'], u'bacon': [u'cheeseburger']} | |
(pythonvenv)% python test.py | |
{u'foo': u'bar', u'bacon': u'cheeseburger'} |
I hereby claim:
To claim this, I am signing this object:
// Happy "I can copy and paste and write enough JavaScript to get the thing that I wanted to do done" Day | |
// - Aaron | |
String.prototype.repeat = function(times) { | |
return (new Array(times + 1)).join(this); | |
}; // from http://stackoverflow.com/questions/4549894/how-can-i-repeat-strings-in-javascript | |
function insertAfter(referenceNode, newNode) { | |
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling); | |
}; // from http://stackoverflow.com/questions/4793604/how-to-do-insert-after-in-javascript-without-using-a-library |
import os | |
import stat | |
from os.path import dirname | |
from glob import glob | |
import time | |
for cmdline in glob('/proc/*/cmdline'): | |
f = open(cmdline).read() | |
if f.startswith('/usr/sbin/inetd'): | |
inetd_pid = int(cmdline.split('/')[2]) |
import sys, urllib | |
from pyquery import PyQuery as pq | |
from html2text import html2text | |
from unidecode import unidecode | |
d = pq(urllib.urlopen(sys.argv[1]).read()) | |
print unidecode(html2text(d(".entry-content").html())) |
function box_name { | |
[ -f ~/.box-name ] && cat ~/.box-name || hostname -s | |
} | |
local current_dir='${PWD/#$HOME/~}' | |
local git_info='$(git_prompt_info)' | |
function virtualenv_info_2 { | |
[ $VIRTUAL_ENV ] && ( | |
echo "%{$terminfo[bold]$fg[red]%}v:%{$fg[yellow]%}`basename $VIRTUAL_ENV`%{$reset_color%}" |
#!/usr/bin/env python | |
# Adapted from David Llewellyn-Jones's code | |
# http://www.flypig.co.uk/?page=list&list_id=363&list=blog | |
# By Aaron Brady | |
# http://insom.me.uk/ | |
import turtle as t | |
import sys | |
import tty |
import re | |
import sys | |
states = ('DEFAULT', 'HAVE_FILE') | |
fl = re.compile('^fl=(.*)') | |
num = re.compile('^\d+ (\d+)') | |
state = 0 | |
current_file = '' | |
inclusive = False |
diff -ru magento-17/app/code/core/Mage/Core/Helper/Cookie.php magento-patched/app/code/core/Mage/Core/Helper/Cookie.php | |
--- magento-17/app/code/core/Mage/Core/Helper/Cookie.php 2012-07-05 11:49:29.000000000 +0100 | |
+++ magento-patched/app/code/core/Mage/Core/Helper/Cookie.php 2013-09-26 10:52:24.701527319 +0100 | |
@@ -69,7 +69,7 @@ | |
{ | |
$acceptedSaveCookiesWebsites = $this->_getAcceptedSaveCookiesWebsites(); | |
$acceptedSaveCookiesWebsites[Mage::app()->getWebsite()->getId()] = 1; | |
- return serialize($acceptedSaveCookiesWebsites); | |
+ return json_encode($acceptedSaveCookiesWebsites); | |
} |
#!/usr/bin/python | |
# git config annex.ftp-hook = "/usr/local/bin/git-annex-ftp.py" | |
# git annex initremote iwebftp type=hook hooktype=ftp encryption=none | |
from ftplib import FTP | |
import os | |
f = FTP('prefix.iweb-storage.com', 'prefix-admin', 'password') | |
f.set_pasv(True) |