Skip to content

Instantly share code, notes, and snippets.

if [ -z "$WORKON_HOME" ]; then
export WORKON_HOME="$HOME/.virtualenvs"
fi
workon () {
virtualenv="$1"
if [ -z "$virtualenv" ]; then
echo "Usage: workon env_name" >&2
return 1
fi
diff --git a/YouTubeCore.py b/YouTubeCore.py
index d955e49..b088134 100644
--- a/YouTubeCore.py
+++ b/YouTubeCore.py
@@ -397,7 +397,10 @@ class YouTubeCore():
return ret_obj
if get("url_data"):
- request = urllib2.Request(link, urllib.urlencode(get("url_data")))
+ args = {}
@iley
iley / autohotkey.ahk
Last active December 20, 2015 01:29
My autohotkey script
Capslock::Control ; capslock instead of ctrl
LShift & RShift::ToggleCapslock()
RShift & LShift::ToggleCapslock()
; workaround for Social Club
#IfWinActive, ahk_class #32770
Joy1::Send {Return}
#IfWinActive
return
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct node_t node_t;
struct node_t {
int val;
node_t *parent;
node_t *left;
@iley
iley / heapsort.c
Last active December 17, 2015 03:19
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
int left(int i) {
return 2 * i;
}
int right(int i) {
return 2 * i + 1;
@iley
iley / gist:5441304
Created April 23, 2013 06:40
debian control file for fresh version of surf
Package: surf-git
Version: 0.6
Architecture: amd64
Maintainer: Ilya Strukov <[email protected]>
Depends: libc6 (>= 2.4), libglib2.0-0 (>= 2.12.0), libgtk2.0-0 (>= 2.24.0),
libjavascriptcoregtk-1.0-0 (>= 1.5.1), libsoup2.4-1
(>= 2.26.1), libwebkitgtk-1.0-0 (>= 1.3.10), libx11-6,
suckless-tools, x11-utils, xterm, wget
Priority: optional
Description: simple web browser
; Global settings
[redshift]
temp-day=5700
temp-night=4800
transition=1
; gamma=0.8:0.7:0.8
location-provider=manual
; The location provider and adjustment method settings
; are in their own sections.
[gui]
absolute_position=
always_on_top=true
background_color=#f57900
bounce=true
font=Sans
font_size=13
foreground_color=#101010
height=19
in_animation=38
@iley
iley / muttrc
Created February 25, 2013 16:19
muttrc sample
set smtp_url="smtp://[email protected]:587"
set smtp_pass="password"
set from="[email protected]"
set realname="John Smith"
" save «smart» backups every day
function! BackupDir()
let l:backupdir=$HOME.'/.vim/backup/'.
\substitute(expand('%:p:h'), '^'.$HOME, '~', '')
if !isdirectory(l:backupdir)
call mkdir(l:backupdir, 'p', 0700)
endif
let &backupdir=l:backupdir