Skip to content

Instantly share code, notes, and snippets.

apokalyptik

Block or report user

Report or block apokalyptik

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
View req-to-local.sh
#!/bin/bash
#
# Please note: This script is likely very brittle...
#
ORIGIN=$1
OUT_DIR=$2
if [ "$2" == "" ] || [ "$1" == "" ]; then echo "Please specify origin requirements file and output directory"; exit 4; fi
@apokalyptik
apokalyptik / test.go
Created Jun 18, 2014
Patricia VS Quicktrie
View test.go
package main
import (
"crypto/rand"
"log"
"net/http"
_ "net/http/pprof"
"github.com/apokalyptik/quicktrie"
"gopkg.in/tchap/go-patricia.v1/patricia"
@apokalyptik
apokalyptik / sockchat.go
Created Jun 18, 2014
Simple chat server in go
View sockchat.go
package main
import (
"log"
"net/http"
"code.google.com/p/go.net/websocket"
)
type register struct {
View keybase.md

Keybase proof

I hereby claim:

  • I am apokalyptik on github.
  • I am apokalyptik (https://keybase.io/apokalyptik) on keybase.
  • I have a public key whose fingerprint is 8832 E456 A26F 1E55 CBD7 32BD ED63 D6A0 9A85 639A

To claim this, I am signing this object:

View string-slice-flag.go
type Foo struct {
value []string
}
func (f *Foo) String() string {
return ""
}
func (f *Foo) Set(s string) error {
f.value = append(f.value, s)
@apokalyptik
apokalyptik / decrypt.go
Created Sep 1, 2014
Go RSA private key decryption example. Compatible with data encrypted via http://us3.php.net/openssl_public_encrypt
View decrypt.go
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"flag"
"fmt"
"io/ioutil"
View first-web-server.go
package main
import (
"flag"
"fmt"
"log"
"net/http"
)
var listenOn = "127.0.0.1:8888"
View quicktrietestserver.go
package main
import (
"flag"
"fmt"
"log"
"net/http"
"sync"
"time"
View remixweather.go
package main
import (
"encoding/json"
"flag"
"fmt"
"log"
"net/http"
"github.com/gorilla/mux"
View .tmux.conf
# Mouse support - set to on if you want to use the mouse
setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
You can’t perform that action at this time.