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
void namedParameter(String param1, String param2, | |
{bool enable, bool bold = false, bool hidden = false}) { | |
print("namedParameter:param1=${param1}"); | |
print("namedParameter:param2=${param2}"); | |
print("namedParameter:enable=${enable}"); | |
print("namedParameter:bold=${bold}"); | |
print("namedParameter:hidden=${hidden}"); | |
print("--"); | |
} |
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
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <unistd.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
void parent_process(int fd) { | |
int i; | |
fprintf(stderr, "FD of parent process: %d.\n", fd); |
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
# -*- coding: utf-8 -*- | |
""" MRO Experiment | |
$ python -i mro_exp.py | |
>>> a = GD1(1, 2, 3, 4, 5, 6, 7, 8) | |
_Base(*args=(), **kwds={}) | |
CL3(cparam3a=7, cparam3b=8, *args=(), **kwds={}) |
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
#!/bin/bash | |
# source ~/bin/env-autotools.sh | |
OPT_BASE=/opt | |
which autoreconf | |
if [ "$?" != "0" ]; then | |
export PATH=${OPT_BASE}/autoconf-2.69/bin:$PATH | |
fi |
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
#!/bin/bash | |
while true; do | |
echo "Press [CTRL+C] to stop.." | |
/bin/date | |
sleep 3 | |
if [ "$?" == "1" ]; then | |
break | |
fi | |
done |
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
// Test mysql speed over various DSN with SELECT NOW() | |
// | |
// Build with: | |
// // make an empty folder and cd into | |
// export GOPATH=`pwd` | |
// go get gist.github.com/e792f270bb6bc93a2a671bb7519d5417.git | |
// // or, for cross-build: | |
// env GOOS=linux GOARCH=amd64 go build -v gist.github.com/e792f270bb6bc93a2a671bb7519d5417.git | |
package main |
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 apt-get remove binutils cpp cpp-4.8 cpp-4.9 dkms fakeroot gcc gcc-4.8 gcc-4.9 libasan0 libasan1 libatomic1 libc-dev-bin libc6-dev libcilkrts5 libcloog-isl4 libfakeroot libgcc-4.8-dev libgcc-4.9-dev libgomp1 libisl10 libitm1 liblsan0 libmpc3 libmpfr4 libquadmath0 libtsan0 libubsan0 linux-compiler-gcc-4.8-x86 linux-headers-3.16.0-4-amd64 linux-headers-3.16.0-4-common linux-headers-amd64 linux-kbuild-3.16 linux-libc-dev make manpages-dev open-vm-tools-dkms patch |
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
import "time" | |
import "math/rand" | |
func init() { | |
rand.Seed(time.Now().Unix()) | |
} | |
func GenerateRandomPassword(length int) string { | |
const base_string = "2346789BCDFGHJKMPQRTVWXY" | |
const l_base_string = len(base_string) |
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 local.dev; | |
import org.eclipse.swt.SWT; | |
import org.eclipse.swt.widgets.Display; | |
import org.eclipse.swt.widgets.Shell; | |
public class TestWindow { | |
protected Shell shell; |
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
#!/bin/bash | |
MVN_HOME=/.../apache-maven-3.3.3 | |
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre | |
exec $MVN_HOME/bin/mvn "$@" |