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 http://xivilization.net/~marek/raspbian/xivilization-raspbian.gpg.key -O - | sudo apt-key add - | |
sudo wget http://xivilization.net/~marek/raspbian/xivilization-raspbian.list -O /etc/apt/sources.list.d/xivilization-raspbian.list | |
sudo aptitude update | |
sudo aptitude install golang |
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
# apt-get install devscripts build-essential | |
# apt-get build-dep golang-go | |
wget http://ftp.de.debian.org/debian/pool/main/g/golang/golang_1.3-1.dsc | |
wget http://ftp.de.debian.org/debian/pool/main/g/golang/golang_1.3.orig.tar.gz | |
wget http://ftp.de.debian.org/debian/pool/main/g/golang/golang_1.3-1.debian.tar.xz | |
dpkg-source -x golang_1.3-1.dsc | |
cd golang-1.3/ | |
debuild -us -uc | |
cd .. |
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
var gulp = require('gulp') | |
var through = require('through') | |
var clone = require('clone') | |
var Buffer = require('buffer').Buffer | |
var gutil = require('gulp-util') | |
var spawn = require('child_process').spawn | |
// Compile Haml into HTML | |
gulp.task('haml', function() { | |
var files = [] |
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
db: | |
image: postgres | |
ports: | |
- "5432" | |
app: | |
build: . | |
environment: | |
RAILS_ENV: development | |
ports: | |
- "3000:3000" |
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 rails:onbuild | |
# Disable bundle freeze so we can install additional gems | |
RUN bundle config --global frozen 0 |
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
ffmpeg -ss 00:00:00.000 -i IMG_3025.MOV -vf "boxblur=4:2,mp=eq2=1:1:0.12:0.0:1:1:1" -an -s 960x540 -t 00:00:10.000 outpu2t.mp4 |
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
// this | |
var o = new Foo(); | |
// equals this | |
var o = new Object(); | |
o.[[Prototype]] = Foo.prototype; // we cannot call [[Prototype]] | |
Foo.call(o); | |
// its recursive | |
Object.getPrototypeOf(o).someProp | |
// and then if not exists |
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
package main | |
import ( | |
"os" | |
"bufio" | |
) | |
func main() { | |
scanner := bufio.NewScanner(bufio.NewReader(os.Stdin)) | |
for scanner.Scan() { |
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
package main | |
import ( | |
"os" | |
"bufio" | |
"fmt" | |
"sort" | |
"math" | |
) |
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 su postgres | |
psql | |
update pg_database set datistemplate=false where datname='template1'; | |
drop database Template1; | |
create database template1 with owner=postgres encoding='UTF-8' | |
lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0; |