Skip to content

Instantly share code, notes, and snippets.

View gesellix's full-sized avatar
🐱
🐋

Tobias Gesellchen gesellix

🐱
🐋
View GitHub Profile
@gesellix
gesellix / changelog.sh
Last active August 29, 2015 14:09 — forked from alexec/changelog.sh
#! /bin/sh
# Creates a markdown formatted change log based the git history
set -eu
OWNER=${1:-'docker-java'}
REPO=${2:-'docker-java'}
USER=$(cat ~/.git_user)
PASS=$(cat ~/.git_password)
function pullDesc() {
@gesellix
gesellix / keybase.md
Created December 5, 2014 07:56
keybase proof

Keybase proof

I hereby claim:

  • I am gesellix on github.
  • I am gesellix (https://keybase.io/gesellix) on keybase.
  • I have a public key whose fingerprint is 0D28 580E F701 B4C0 9528 25A8 4824 02A5 B6DC E335

To claim this, I am signing this object:

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.HttpURLConnection;
// This is a very basic implementation of the Docker API v. 1.12 for attaching to a containers StdOut and StdErr stream using HTTP
// It is not perfect (see official Docker API documentation for details and how to handle the bytestream) but up to this date its
// the most compleate, working example for this to get an idea what's going on there. Happy about any improvement ideas.
public class Readin
{ "@timestamp": "2015-02-02T04:25:26+0000", "@fields": { "status": 200, "request": "/author/", "bytes": 43, "more": { "host" : "localhost"} } }
{ "@timestamp": "2015-02-02T04:25:27+0000", "@fields": { "status": 404, "request": "/title/", "bytes": 84, "more": { "host" : "localhost"} } }
{ "@timestamp": "2015-02-02T04:25:28+0000", "@fields": { "status": 302, "request": "/publisher/", "bytes": 45, "more": { "host" : "localhost"} } }
{ "@timestamp": "2015-02-02T04:25:29+0000", "@fields": { "status": 202, "request": "/keywords/", "bytes": 700, "more": { "host" : "localhost"} } }
@gesellix
gesellix / colors.js
Last active August 29, 2015 14:20
Espruino Pico
SPI2.setup({baud:3200000,mosi:B15});
var setColor = function(arr){
SPI2.send4bit(arr, 0b0001, 0b0011);
};
setColor([255,0,0, 0,255,0, 0,0,255]);
/*
var ledCount = 3;

Creating a Happy Git Environment on OS X

Step 1: Install Git

Configure things:

git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global alias.co checkout

git config --global apply.whitespace nowarn

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@gesellix
gesellix / auth.go
Last active August 29, 2015 14:22 — forked from tristanwietsma/auth.go
package main
import (
"encoding/base64"
"net/http"
"strings"
)
type handler func(w http.ResponseWriter, r *http.Request)
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
@gesellix
gesellix / gbr.txt
Last active September 19, 2015 21:03 — forked from viktorklang/gbr.txt
shell alias for showing git branches sorted by last activity date
alias gbr='git for-each-ref --sort="-authordate:iso8601" --format=" %(color:green)%(authordate:iso8601)%09%(color:white)%(refname:short)" refs/heads'