This file contains 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 /tmp | |
wget https://foundationdb.com/downloads/I_accept_the_FoundationDB_Community_License_Agreement/2.0.0/foundationdb-clients_2.0.0-1_amd64.deb | |
sudo dpkg -i foundationdb-clients_2.0.0-1_amd64.deb | |
wget https://foundationdb.com/downloads/I_accept_the_FoundationDB_Community_License_Agreement/2.0.0/foundationdb-server_2.0.0-1_amd64.deb | |
sudo dpkg -i foundationdb-server_2.0.0-1_amd64.deb |
This file contains 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
-- Override awesome.quit when we're using GNOME | |
_awesome_quit = awesome.quit | |
awesome.quit = function() | |
if os.getenv("DESKTOP_SESSION") == "awesome-gnome" then | |
os.execute("/usr/bin/gnome-session-quit") | |
else | |
_awesome_quit() | |
end | |
end |
This file contains 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
# Running terminator | |
docker pull quay.io/happypancake/terminator | |
docker stop terminator || echo "nothing to stop" | |
docker rm terminator || echo "nothing to remove" | |
docker run -lxc-conf="lxc.cgroup.cpuset.cpus=0-1" -e "GOMAXPROCS=2" -t -p="0.0.0.0:80:80" -name=terminator quay.io/happypancake/terminator | |
# Running web-aggregator | |
docker pull quay.io/happypancake/web | |
docker stop web || echo "nothing to stop" | |
docker rm web || echo "nothing to remove" |
This file contains 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
docker run -lxc-conf="lxc.cgroup.cpuset.cpus=0-5" -e "GOMAXPROCS=6" -t -p="0.0.0.0:80:80" -name=terminator quay.io/happypancake/terminator -http-address=0.0.0.0:80 -bus-pull-address=0.0.0.0:10001 -bus-push-address=0.0.0.0:10002 | |
This file contains 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 ubuntu:12.04 | |
RUN \ | |
apt-get update -qq; \ | |
apt-get install build-essential dh-autoreconf git -y -qq; \ | |
echo "* hard nofile 200000" >> "/etc/security/limits.conf"; \ | |
echo "* soft nofile 200000" >> "/etc/security/limits.conf"; \ | |
echo "root hard nofile 200000" >> "/etc/security/limits.conf"; \ | |
echo "root soft nofile 200000" >> "/etc/security/limits.conf"; \ | |
cd /tmp; \ |
This file contains 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 apt-get update && \ | |
sudo apt-get install build-essential git libev-dev -y && \ | |
git clone https://github.com/lighttpd/weighttp.git && \ | |
cd weighttp && \ | |
./waf configure && \ | |
./waf build && \ | |
cp build/default/weighttp /usr/local/bin |
This file contains 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 ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
func main() { | |
rand.Seed(time.Now().UnixNano()) |
This file contains 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
func sleepSort(input []int) []int { | |
length := len(input) | |
sorting := make(chan int) | |
for i := 0; i < length; i++ { | |
go func(n int) { | |
time.Sleep(time.Duration(n) * time.Millisecond * slack) | |
sorting <- n | |
}(input[i]) | |
} |
This file contains 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
initialize: function() { | |
_.bindAll(this, 'detect_scroll'); | |
// bind to window | |
$(window).scroll(this.detect_scroll); | |
} |
OlderNewer