Skip to content

Instantly share code, notes, and snippets.

INSTALLDIR=/home/col/dev/ghost-0.11.7-0
if [ -r "$INSTALLDIR/scripts/setenv.sh" ]; then
. "$INSTALLDIR/scripts/setenv.sh"
fi
<code>
grep Remove /var/log/apt/history.log | tail -1 | sed -e 's|Remove: ||g' -e 's|([^)]*)||g' -e 's|:[^ ]* ||g' -e 's|,||g' > removed_packages.txt
sudo apt-get install $(cat removed_packages.txt)
<code>
wget https://github.com/fingerproof/cordova-plugin-gapreload/archive/master.zip
unzip master.zip
mv cordova-plugin-gapreload-master/ plugins/
rm master.zip
cd() {
builtin cd "$@"
local status=$?
[ $status -eq 0 ] && ls
if [ -d "bin" ]; then
if [ -f "bin/activate" ]; then
builtin source ./bin/activate
echo virtualenv has been activated!
fi
fi
#!/bin/sh
VERSION=0.8.6
PLATFORM=darwin
ARCH=x64
PREFIX="$HOME/node-v$VERSION-$PLATFORM-$ARCH"
mkdir -p "$PREFIX" && \
curl http://nodejs.org/dist/v$VERSION/node-v$VERSION-$PLATFORM-$ARCH.tar.gz \
| tar xzvf - --strip-components=1 -C "$PREFIX"
@colwilson
colwilson / burn_usb.sh
Created April 20, 2013 08:10
Burns a Flash Drive from an ISO
sudo ls -l /dev/disk/by-id/*usb*
# the three letter ones (sdb, sdc etc) are your choices of Flash Drive
usb=sdb
iso=~/Downloads/myiso.iso
sudo dd if=${iso} of=/dev/${usb} bs=4M; sync
PROJ=gae_project
mkvirtualenv ${PROJ}
cdvirtualenv
GAE=1.7.4
wget -O /tmp/gae.zip http://googleappengine.googlecode.com/files/google_appengine_${GAE}.zip
unzip /tmp/gae.zip
GAE_APP_NAME=dummy
mkdir -p gae_app/static
from nagare import presentation
class Counter(object):
def __init__(self):
self.val = 0
def increase(self):
self.val += 1
from nagare import presentation
class Welcome(object):
message = "Hello World!"
@presentation.render_for(Welcome)
def render(welcome, h, *args):
"""
HTML fragment is associated with `Welcome` class as its default view.
from nagare import presentation
class Counter(object):
def __init__(self):
self.val = 0
def increase(self):
self.val += 1