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
#!/bin/bash | |
base_port=5000 | |
# Command line input: number of servers | |
# E.g. 5 | |
num_servers=$1 | |
shift | |
# Command line input: base report file name | |
# E.g. report |
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
#!/bin/bash | |
base_port=5000 | |
# Command line input: server IP address | |
# E.g. 1.1.1.1 | |
server_ip=$1 | |
shift | |
# Command line input: number of clients to start |
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
[caglar@qop:~/go/src/gopkg.in/lxc/go-lxc.v2/examples] ./start | |
2015/01/24 14:35:15 Starting the container... | |
2015/01/24 14:35:16 Waiting container to startup networking... | |
[caglar@qop:~/go/src/gopkg.in/lxc/go-lxc.v2/examples] ./stats | |
2015/01/24 14:35:23 MemoryUsage: 10.34MB | |
2015/01/24 14:35:23 MemoryLimit: 128.00MB | |
2015/01/24 14:35:23 KernelMemoryUsage: 3.52MB | |
2015/01/24 14:35:23 KernelMemoryLimit: 3.52MB | |
2015/01/24 14:35:23 MemorySwapUsage: 10.34MB |
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
import ctypes | |
def siginterrupt(signum, flag): | |
libc = ctypes.CDLL("libc.so.6") | |
if libc.siginterrupt(signum, flag) != 0: | |
raise OSError("siginterrupt failed") |
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
# apt-get install -y mercurial gcc libc6-dev | |
# hg clone -u default https://code.google.com/p/go /opt/go | |
# cd /opt/go/src | |
# ./make.bash | |
# echo "PATH=\"\$PATH:/opt/go/bin\"" > /etc/profile.d/go.sh |
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
# apt-get update | |
# apt-get dist-upgrade | |
# apt-get install screen vim git avahi-daemon chkconfig watchdog mc libzmq-dev libzmq1 netatalk | |
# modprobe bcm2708_wdog | |
# echo "bcm2708_wdog" >>/etc/modules | |
# chkconfig watchdog on | |
# cat /etc/watchdog.conf | grep -v ^# |
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 echo "deb http://archive.mene.za.net/raspbian wheezy contrib" > /etc/apt/sources.list.d/mene.list | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 5243CDED | |
sudo apt-get update | |
sudo apt-get install xbmc |
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
ubuntu: | |
CFLAGS="-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security" CPPFLAGS="-D_FORTIFY_SOURCE=2" CXXFLAGS="-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security" FFLAGS="-g -O2" LDFLAGS="-Wl,-Bsymbolic-functions -Wl,-z,relro" ./configure --prefix=/usr --sysconfdir=/etc --bindir=/usr/bin --libdir=/usr/lib/x86_64-linux-gnu/ --libexecdir=/usr/lib/x86_64-linux-gnu/ --with-rootfs-path=/usr/lib/x86_64-linux-gnu/lxc --localstatedir=/var --includedir=/usr/include --enable-tests --enable-cgmanager | |
fedora20: | |
./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-python --disable-rpath --with-init-script=s |
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
go get code.google.com/p/go.tools/cmd/godoc | |
go get code.google.com/p/go.tools/cmd/vet | |
go get code.google.com/p/go.tools/cmd/cover | |
go get github.com/golang/lint/golint | |
go get -u code.google.com/p/go.tools/cmd/godoc | |
go get -u code.google.com/p/go.tools/cmd/vet | |
go get -u code.google.com/p/go.tools/cmd/cover | |
go get -u github.com/golang/lint/golint |
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 ( | |
"github.com/codegangsta/martini" | |
"net/http/pprof" | |
) | |
func main() { | |
m := martini.Classic() |
OlderNewer