This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INSTALLDIR=/home/col/dev/ghost-0.11.7-0 | |
| if [ -r "$INSTALLDIR/scripts/setenv.sh" ]; then | |
| . "$INSTALLDIR/scripts/setenv.sh" | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wget https://github.com/fingerproof/cordova-plugin-gapreload/archive/master.zip | |
| unzip master.zip | |
| mv cordova-plugin-gapreload-master/ plugins/ | |
| rm master.zip | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| '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', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from nagare import presentation | |
| class Counter(object): | |
| def __init__(self): | |
| self.val = 0 | |
| def increase(self): | |
| self.val += 1 |
NewerOlder