Skip to content

Instantly share code, notes, and snippets.

View javib51's full-sized avatar
:octocat:

Javier Benitez javib51

:octocat:
View GitHub Profile
include $(GOROOT)/src/Make.$(GOARCH)
TARG=kademlia
GOFILES=\
nodeid.go\
routingtable.go\
contact.go\
kademlia.go
include $(GOROOT)/src/Make.pkg
@paulsmith
paulsmith / echo.go
Created January 12, 2011 06:09
A simple echo server testing a few interesting Go language features, goroutines and channels.
// $ 6g echo.go && 6l -o echo echo.6
// $ ./echo
//
// ~ in another terminal ~
//
// $ nc localhost 3540
package main
import (
@kybernetyk
kybernetyk / echo_channel.go
Created April 6, 2011 11:25
Concurrent Echo Server in GO (CHANNELS ARE THE WAR!)
package main
import (
"net"
"os"
"fmt"
"bufio"
"strings"
)
@lox
lox / sysbench.sh
Created April 27, 2011 21:24
Running a sysbench test against MySQL
sudo aptitude install sysbench
echo "create database sbtest; grant all on sbtest.* to 'sbtest'@'localhost';" | mysql
sysbench --test=oltp --num-threads=10 prepare
sysbench --test=oltp --num-threads=10 run
@iwanbk
iwanbk / gist:2295233
Created April 3, 2012 20:15
TCP Echo Client in Golang
package main
import (
"net"
"os"
)
func main() {
strEcho := "Halo"
servAddr := "localhost:6666"
tcpAddr, err := net.ResolveTCPAddr("tcp", servAddr)
@birkhoff
birkhoff / tycho_build-SNAPSHOT.gradle
Created May 18, 2012 14:49
Tycho Gradle Build Script
apply plugin: 'base'
import groovy.io.FileType
tychoVersion = "0.14.1"
try{
workspacePath = workspacePath
}catch(MissingPropertyException e){
workspacePath = "../"
@frsyuki
frsyuki / my_thoughts_on_msgpack.md
Created June 11, 2012 02:36
My thoughts on MessagePack

My thoughts on MessagePack

Hi. My name is Sadayuki "Sada" Furuhashi. I am the author of the MessagePack serialization format as well as its implementation in C/C++/Ruby.

Recently, MessagePack made it to the front page of Hacker News with this blog entry by Olaf, the creator of the Facebook game ZeroPilot. In the comment thread, there were several criticisms for the blog post as well as MessagePack itself, and I thought this was a good opportunity for me to address the questions and share my thoughts.

My high-level response to the comments

To the best of my understanding, roughly speaking, the criticisms fell into the following two categories.

@justx1
justx1 / mosquitto.conf
Created October 2, 2013 08:19
Addition to mosquitto.conf for bridging MQTT brokers http://e.verything.co/post/62163759361/bridging-two-mqtt-brokers
connection cloudmqtt
try_private false
address broker.cloudmqtt.com:<port>
start_type automatic
username <your_username_here>
password <your_password_here>
clientid <any_clientid_here>
notifications true
@dmitshur
dmitshur / gist:6927554
Last active July 14, 2024 16:13
[Legacy GOPATH mode] How to `go get` private repos using SSH key auth instead of password auth.
@ldx
ldx / gist:9116170
Created February 20, 2014 15:23
Build a chroot with a CentOS 6.5 base install.
#!/bin/sh
#
# Build a chroot with a CentOS 6.5 base install.
#
CHROOT=/tmp/chroot
mkdir -p $CHROOT
mkdir -p $CHROOT/var/lib/rpm