Skip to content

Instantly share code, notes, and snippets.

Col Wilson colwilson

Block or report user

Report or block colwilson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ctlscript.sh
INSTALLDIR=/home/col/dev/ghost-0.11.7-0
if [ -r "$INSTALLDIR/scripts/setenv.sh" ]; then
. "$INSTALLDIR/scripts/setenv.sh"
fi
View installion-how-to-undo-an-apt-get-remove.sh
<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>
View install_cordova-plugin-gapreload-master.sh
wget https://github.com/fingerproof/cordova-plugin-gapreload/archive/master.zip
unzip master.zip
mv cordova-plugin-gapreload-master/ plugins/
rm master.zip
View designer.html
<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 Jun 25, 2014
packages/home/public/routes/home.js
View 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',
View autovirt.sh
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
View install-nodejs.sh
#!/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 Apr 20, 2013
Burns a Flash Drive from an ISO
View burn_usb.sh
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
View install.sh
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
View example3.py
from nagare import presentation
class Counter(object):
def __init__(self):
self.val = 0
def increase(self):
self.val += 1
You can’t perform that action at this time.