Add this entry to your local .git/config:
[remote "prod"]
url = amazon:/path/to/repo.git
fetch = +refs/heads/*:refs/remotes/amazon/*
| #!/bin/sh | |
| # Output file for HTML5 video | |
| # requirements: ffmpeg .6+ | |
| # usage: ./html5video.sh infile.mp4 640x360 | |
| target_directory='converted' | |
| file=`basename $1` | |
| filename=${file%.*} | |
| filepath=`dirname $1` |
| // Converts #hashtags, @usernames, and http://regularlin.ks | |
| var tweet = 'Final day for the 2 @nvidia *INSTANT ACCESS* @PlanetSide2 #BetaKeys. RT: https://t.co/gKpxu1eY and/or Follow: http://t.co/3ryWGeEz to enter!'; | |
| tweet = tweet | |
| .replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, '<a target=_blank href="$1">$1</a>') | |
| .replace(/(^|\s)@(\w+)/g, '$1<a target=_blank href=//twitter.com/$2>@$2</a>') | |
| .replace(/(^|\s)#(\w+)/g, '$1<a target=_blank href=//twitter.com/search?q=%23$2>#$2</a>'); | |
| # curl -L https://raw.github.com/gist/3431015/bootstrap.sh | sh | |
| USERNAME=$(id -un) | |
| COMMON_PKGS="curl vim git zsh autojump tmux" | |
| command_exists () { | |
| type "$1" &> /dev/null ; | |
| } | |
| if command_exists apt-get ; then |
| # Packages | |
| sudo apt-get install curl vim git zsh autojump tmux python-gpgme g++ libssl-dev apache2-utils | |
| # Dotfiles | |
| git init | |
| git remote add -f origin git://github.com/liamcurry/dotfiles.git | |
| git submodule update --init --force | |
| git config status.showuntrackedfiles no | |
| chsh -s /bin/zsh |
| /* This needs some work, and is probably pretty broken at the moment. Will come back to this later. */ | |
| define([ | |
| 'underscore' | |
| ], function ( | |
| _ | |
| ) { | |
| console.log(this); | |
| var root = this; |
Start/Restart/Stop MySQL
mysql.server [stop|start|restart]Create a MySQL database
create database db_name;| cd ~ | |
| sudo apt-get update | |
| sudo apt-get install openjdk-7-jre-headless -y | |
| wget https://github.com/elasticsearch/elasticsearch/archive/v0.20.1.tar.gz -O elasticsearch.tar.gz | |
| tar -xf elasticsearch.tar.gz | |
| rm elasticsearch.tar.gz | |
| sudo mv elasticsearch-* elasticsearch | |
| sudo mv elasticsearch /usr/local/share |
| function EventEmitter() {} | |
| EventEmitter.prototype.on = | |
| EventEmitter.prototype.addListener = function (event, callback) { | |
| this._events = this._events || {}; | |
| this._events[event] = this._events[event] || []; | |
| this._events[event].push(callback); | |
| return this; | |
| }; |
| #!/usr/bin/env python | |
| import pymongo | |
| import requests | |
| import threading | |
| from pprint import pprint | |
| EXCHANGES = { | |
| 'mtgox': 'http://data.mtgox.com/api/2/BTCUSD/money/ticker', | |
| 'bitstamp': 'https://www.bitstamp.net/api/ticker/', |