Skip to content

Instantly share code, notes, and snippets.

Matthias Kadenbach mattes

Block or report user

Report or block mattes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
victorcoder / haproxy.lua
Last active Feb 24, 2017
Heka haproxy lua decoder
View haproxy.lua
local dt = require "date_time"
local ip = require "ip_address"
local l = require 'lpeg'
local syslog = require "syslog"
local msg = {
Timestamp = nil,
Hostname = nil,
Payload = nil,
chiedo /
Last active Oct 4, 2019
Configuring boot2docker to use NFS on an OSX machine

Configuring Boot2Docker to use NFS on an OSX based machine

  • To improve the speed of Boot2Docker drastically, you will want to set it up to use NFS.
  • You will need to do the following once on your host machine:
    • Add this to /etc/exports on your mac

      /Users -alldirs -mapall=501:20
sailor / Vagrantfile
Created Mar 25, 2015
Vagrantfile for Rails development environment
View Vagrantfile
$install = <<SCRIPT
curl -L`uname -s`-`uname -m` > /usr/local/bin/fig
chmod +x /usr/local/bin/fig
$build = <<SCRIPT
cd /vagrant
fig build
ngauthier / timeout_and_tick.go
Created Feb 10, 2015
Golang timeout and tick loop
View timeout_and_tick.go
// keepDoingSomething will keep trying to doSomething() until either
// we get a result from doSomething() or the timeout expires
func keepDoingSomething() (bool, error) {
timeout := time.After(5 * time.Second)
tick := time.Tick(500 * time.Millisecond)
// Keep trying until we're timed out or got a result or got an error
for {
select {
// Got a timeout! fail with a timeout error
case <-timeout:
denji /
Last active Jan 28, 2020 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository:

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
Jupiterrr /
Last active Aug 29, 2015
This script syncs the current directory to /home/docker/share on a boot2docker vm.
set -u # prevent unbound variables
set -e # terminate on error
SSH_PORT=$(boot2docker config 2>&1 | awk '/SSHPort/ {print $3}')
# install rsync
boot2docker ssh tce-load -wi rsync
schnoddelbotz /
Last active Aug 29, 2015
Place a call from terminal using your iPhone - by providing contact's (partial) name (works for local/OnMyMac records only)
# call-x
# no beauty but some joy:
# use osx address book from terminal for (i)phone dialing purposes.
# usage:
# $ call-x your-pal's-name...or-partial-number...
# In response to the wonderful link max shared with me:
jbardin / proxy_copy.go
Last active Jan 13, 2019
Go TCP Proxy pattern
View proxy_copy.go
package proxy
import (
func Proxy(srvConn, cliConn *net.TCPConn) {
// channels to wait on the close event for each connection
vkryukov / gist:4d53f84080bf088f087b
Created Jun 30, 2014
go.enmime library example
View gist:4d53f84080bf088f087b
package main
import (
enmime ""
Integralist / Hash Keys to Symbols.rb
Last active Nov 7, 2019
Convert Ruby Hash keys into symbols
View Hash Keys to Symbols.rb
hash = { 'foo' => 'bar' }
# Version 1
hash = Hash[ { |k, v| [k.to_sym, v] }]
# Version 2
hash = hash.reduce({}) do |memo, (k, v)|
memo.tap { |m| m[k.to_sym] = v }
You can’t perform that action at this time.