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
@colwilson
colwilson / designer.html
Last active August 29, 2015 14:24
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
@colwilson
colwilson / home.js
Created June 25, 2014 23:24
packages/home/public/routes/home.js
'use strict';
angular.module('mean.home').config(['$stateProvider',
function($stateProvider) {
$stateProvider.state('home page', {
url: '/',
templateUrl: 'home/views/index.html'
}).state('home.thing', {
url: '/:thing/index.html',
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