Skip to content

Instantly share code, notes, and snippets.

View tobstarr's full-sized avatar

Tobias Schwab tobstarr

View GitHub Profile
@tobstarr
tobstarr / output.txt
Last active December 22, 2015 19:39
Golang Heisenberg
Committed_AS: 3607224 kB
Committed_AS: 3872632 kB
Committed_AS: 3607156 kB
command! Gotags :call Gotags()
function! Gotags()
exec ':silent !gotags $(find . -name "*.go" | grep -v "/test/" | xargs) 2> /dev/null > tags.tmp && mv tags.tmp tags'
redraw!
endfunction

Socoded Docker

$ jb
USAGE
jb backups create id Create manual backup from box
jb backups list List all running boxes
jb distributions list
jb plans list
jb servers clone id
--plan-id DEFAULT: "20" Plan id
--name DEFAULT: "" Name of the new box
jb servers create Create new JiffyBox
@tobstarr
tobstarr / test.go
Last active December 26, 2015 08:29
package main
import (
"net/http"
"os"
"syscall"
)
func main() {
var proto string
class Indexer
def initialize(clazz)
@clazz = clazz
end
def index(line)
i = @clazz.new
i.parse(line)
i
end
$ cat test.go
package main
import (
"log"
"math/rand"
)
func main() {
log.Print(rand.Int())
@tobstarr
tobstarr / gist:8440876
Last active January 3, 2016 09:09
unicorn.conf
start on startup
chdir /app/current
script
eval $(cat /proc/1/environ | tr "\000" "\n" | sed 's/=/="/' | sed 's/$/"/' | while read env; do echo export $env; done)
bundle exec unicorn -c ./config/unicorn_config.rb
end script
mount: block device /dev/shm is write-protected, mounting read-only
mount: cannot mount block device /dev/shm read-only
dpkg: error processing initscripts (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of ifupdown:
ifupdown depends on initscripts (>= 2.88dsf-13.3); however:
Package initscripts is not configured yet.
dpkg: error processing ifupdown (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of procps:
#!/bin/bash
aws cloudformation create-stack --stack-name test-vpc --template-body file://vpc.json