Skip to content

Instantly share code, notes, and snippets.

Levi Cook levicook

  • Denver, CO
Block or report user

Report or block levicook

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 .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
@levicook
levicook / gist:6753826
Last active Dec 24, 2015
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.
View gist:6753826
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
})
View gist:6688282
$ 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
You can’t perform that action at this time.