Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

#!/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 June 18, 2014 18:36
Patricia VS Quicktrie
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 June 18, 2014 19:11
Simple chat server in go
package main
import (
"log"
"net/http"
"code.google.com/p/go.net/websocket"
)
type register struct {

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:

package main
import (
"flag"
"fmt"
"log"
"net/http"
)
var listenOn = "127.0.0.1:8888"
package main
import (
"flag"
"fmt"
"log"
"net/http"
"sync"
"time"
package main
import (
"encoding/json"
"flag"
"fmt"
"log"
"net/http"
"github.com/gorilla/mux"
# 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
@apokalyptik
apokalyptik / ts.go
Last active September 11, 2015 18:57
Stupid simple program to add timestampt to a programs output...
package main
import (
"bufio"
"io"
"log"
"os"
)
func main() {
@apokalyptik
apokalyptik / gist:5946350
Created July 8, 2013 05:10
Email me when it's more than 30% likely to rain soon... Pop it into cron once daily and forget. A simple and practical example of working with NOAA/weather.com DWML feeds in PHP
<?php
$email = "me@example.com";
// To find your weather feed....
// * Go here: http://forecast.weather.gov/MapClick.php?lat=37.7749295&lon=-122.41941550000001#.UdpHAj7714E
// * Search for your location (upper left side of the page as of 7/7/2013)
// * Click the orange "XML" button/link (on the right hand side, beneath the first map as of the same date)
$feed = 'http://forecast.weather.gov/MapClick.php?lat=39.01000&lon=-96.28&unit=0&lg=english&FcstType=dwml';