Skip to content

Instantly share code, notes, and snippets.

@uschen
uschen / gist:d9cb03d7c613db6503cc
Last active August 29, 2015 14:01
WSJ Homepage Disable Autoplay Video AdBlock Rule
online.wsj.com##div[data-dj-module="dj.module.videos.liveVideoSchedule"]
@uschen
uschen / gist:7521967
Created November 18, 2013 03:24
compile python 3.3 on debian
apt-get build-dep python3.2
apt-get install libreadline-dev libncurses5-dev libssl1.0.0 tk8.5-dev zlib1g-dev liblzma-dev
wget http://python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2
tar jxf ./Python-3.3.2.tar.bz2
cd ./Python-3.3.2
./configure
make
make install
# Google:
export PATH=${PATH}:$HOME/gsutil
# http://unix.stackexchange.com/questions/1288/preserve-bash-history-in-multiple-terminal-windows
# http://superuser.com/questions/137438/how-to-unlimited-bash-shell-history
# https://www.kernel.org/doc/man-pages/online/pages/man3/strftime.3.html
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
export HISTSIZE=100000 # big big history
export HISTFILESIZE=100000 # big big history
export HISTTIMEFORMAT="%a %h %d - %r " # timestamps
@uschen
uschen / .bashrc
Created November 16, 2013 15:32 — forked from Ivoz/.bashrc
# Virtualenvwrapper settings
export WORKON_HOME=~/.virtualenvs
export PROJECT_HOME=~/code
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/bin/virtualenv2
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
#export PIP_REQUIRE_VIRTUALENV=true
export PIP_RESPECT_VIRTUALENV=true
export PIP_VIRTUALENV_BASE=$WORKON_HOME
source /usr/bin/virtualenvwrapper.sh
@uschen
uschen / pyvenvex.py
Created November 15, 2013 18:03 — forked from vsajip/pyvenvex.py
#
# Copyright (C) 2013 Vinay Sajip. New BSD License.
#
import os
import os.path
from subprocess import Popen, PIPE
import sys
from threading import Thread
from urllib.parse import urlparse
from urllib.request import urlretrieve
@uschen
uschen / pr.md
Created November 14, 2013 07:49 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: