Skip to content

Instantly share code, notes, and snippets.

View gist:d27749a8c59aaf1f158dc22d06ade194
types/config.go:81: panic("Config is sealed")
types/kv/kv.go:21: panic("invalid comparison result")
types/address.go:94: panic(err)
types/address.go:97: panic(err)
types/address.go:100: panic(err)
types/address.go:599:// Returns an empty sting if the byte slice is 0-length. It panics if the bech32 conversion
types/address.go:604: panic(err)
types/address.go:658: panic(err)
types/bech32/legacybech32/pk.go:33:// Deprecated: MustMarshalPubKey calls MarshalPubKey and panics on error.
types/bech32/legacybech32/pk.go:37: panic(err)
View tmux.conf
# set -g default-command "reattach-to-user-namespace /bin/bash --login"
# bind y run-shell "tmux save-buffer - | reattach-to-user-namespace pbcopy"
# set -g default-command "/bin/bash --login"
set -g default-command "${SHELL} -l"
bind y run-shell "tmux save-buffer - | reattach-to-user-namespace pbcopy"
# Reload the file with Prefix r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
View .tmux.conf
# Reload the file with Prefix r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind | split-window -h # C-a | to create horizontal pane
bind - split-window -v # C-a - to create vertical pane
# moving between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
View tmux.conf
# Reload the file with Prefix r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind | split-window -h # C-a | to create horizontal pane
bind - split-window -v # C-a - to create vertical pane
# moving between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
View keybase.md

Keybase proof

I hereby claim:

  • I am levicook on github.
  • I am levicook (https://keybase.io/levicook) on keybase.
  • I have a public key ASDdOvdaN5eapWbUGqBmNXdKe4BeeBcYmXJ0HWySrAyvygo

To claim this, I am signing this object:

View gist:e1954229706c30d05e55
execute pathogen#infect()
syntax on
filetype plugin indent on
set nowrap
set background=dark
colorscheme solarized
@levicook
levicook / repos::campus_repo.go
Created Aug 10, 2014
Excerpt of a testing strategy for Go http handlers.
View repos::campus_repo.go
package repos
import (
"fabric-server/models"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
)
type CampusRepo interface {
View gist:ab466a9087c9b2b24d06
$ go install code.google.com/p/go.tools/cmd/vet
go install code.google.com/p/go.tools/cmd/vet: open /usr/local/go/pkg/tool/linux_amd64/vet: permission denied
$ sudo su - root
# GOPATH=/tmp/go /usr/local/go/bin/go get code.google.com/p/go.tools/cmd/cover
# GOPATH=/tmp/go /usr/local/go/bin/go get code.google.com/p/go.tools/cmd/vet
# rm -r /tmp/go
# exit
View tidy.rb
require 'formula'
class Tidy < Formula
homepage 'http://tidy.sourceforge.net/'
url 'ftp://mirror.internode.on.net/pub/gentoo/distfiles/tidy-20090325.tar.bz2'
sha1 '28c000a2cd40262fc0d7c2c429eb2a09b2df7bf4'
head 'https://github.com/w3c/tidy-html5.git'
depends_on :automake => :build
@levicook
levicook / gist:6819972
Created Oct 4, 2013
make tmux start my project
View gist:6819972
#!/bin/bash
set -e # exit if anything goes wrong from here forward
bundle
# are we already in session?
if tmux ls | grep -q spyrojs; then # just attach to the existing session
tmux attach-session -d -t spyrojs
else # create a new session and start the world