Skip to content

Instantly share code, notes, and snippets.

# 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
# 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

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:

execute pathogen#infect()
syntax on
filetype plugin indent on
set nowrap
set background=dark
colorscheme solarized
@levicook
levicook / repos::campus_repo.go
Created August 10, 2014 21:54
Excerpt of a testing strategy for Go http handlers.
package repos
import (
"fabric-server/models"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
)
type CampusRepo interface {
$ 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
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 October 4, 2013 02:10
make tmux start my project
#!/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
@levicook
levicook / gist:6753826
Last active December 24, 2015 05:59
When posting to the create_datastore endpoint, I'm supposed to supply a "key" parameter. Where is the value supposed to come from? Attached, is an detailed view of the http request and response I'm seeing.
calling datastoreManager.CreateDatastore
2013/09/29 10:06:19 Request
2013/09/29 10:06:19 Method : POST
2013/09/29 10:06:19 URL : https://api.dropbox.com/r5/datastores/create_datastore
2013/09/29 10:06:19 Body : (ioutil.nopCloser) {
Reader: (*strings.Reader)(0xc2002634c0)({
s: (string) "dsid=.07b474e1a58eaddc2fd8d96cd19c14",
i: (int) 36,
prevRune: (int) -1
})
$ go version
go version go1.1.2 darwin/amd64
$ go get code.google.com/p/snappy-go/snappy
package code.google.com/p/snappy-go/snappy: Get https://code.google.com/p/snappy-go/source/checkout?repo=: x509: failed to load system roots and no roots provided