Skip to content

Instantly share code, notes, and snippets.

@witooh
witooh / gt.sh
Last active May 27, 2017 17:35
git commit template
#!/bin/sh
# git commit template
gitPath=$(git rev-parse --show-toplevel)
if [ -z $gitPath ]
then
exit $?
fi
gitBranch=$(git symbolic-ref --short HEAD | cut -d"-" -f1 -f2)
@witooh
witooh / Material-Theme-custom.tmTheme
Created May 11, 2016 16:56
Material-Theme-custom.tmTheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="2.4">
<dict>
<key>author</key>
<string>Mattia Astorino (http://astorinomattia.it)</string>
<key>name</key>
<string>Material Theme</string>
<key>semanticClass</key>
@witooh
witooh / docker.sh
Created March 7, 2015 05:24
Install docker in ubuntu
[ -e /usr/lib/apt/methods/https ] || {
apt-get install apt-transport-https
}
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb https://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install -y lxc-docker
@witooh
witooh / http_benchmark
Created February 10, 2015 10:16
http_benchmark
go test -bench=. -timeout=20m
#GithubAPI Routes: 203
Ace: 60520 Bytes
Beego: 165192 Bytes
Bone: 92960 Bytes
Denco: 36440 Bytes
Gin: 66896 Bytes
GocraftWeb: 88840 Bytes
Goji: 50584 Bytes
@witooh
witooh / graphicsmagick.sh
Created February 1, 2015 17:42
Install Graphicsmagick
sudo apt-get install python-software-properties
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:rwky/graphicsmagick
sudo apt-get update
sudo apt-get install graphicsmagick
@witooh
witooh / libvips.sh
Created January 31, 2015 08:47
install libvips
sudo apt-get install python-software-properties
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:dhor/myway
sudo apt-get update
sudo apt-get install libvips38
@witooh
witooh / docker.sh
Last active August 29, 2015 14:05
Ubuntu docker
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\ > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker
@witooh
witooh / cassandra.sh
Created August 15, 2014 05:37
[Ubuntu] Cassadra
echo "deb http://debian.datastax.com/community stable main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
curl -L http://debian.datastax.com/debian/repo_key | sudo apt-key add -
sudo apt-get update
sudo apt-get install dsc20
sudo service cassandra stop
sudo rm -rf /var/lib/cassandra/data/system/*
@witooh
witooh / redis.sh
Created July 10, 2014 03:42
Ubuntu install redis
sudo add-apt-repository -y ppa:rwky/redis
sudo apt-get update
sudo apt-get install -y redis-server
@witooh
witooh / java.sh
Created July 7, 2014 13:09
Ubuntu install java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
#sudo apt-get install oracle-java8-set-default