Skip to content

Instantly share code, notes, and snippets.

cedar(dp-rm-create-release-testrelish|…) % h update
heroku-cli: Updating to 6.7.3-9ecc815... 12.5 MB/12.5 MB
heroku-cli: Updating CLI... already on latest version: 6.7.3-9ecc815
heroku-cli: Updating plugins... !
▸ yarn --non-interactive exited with code 1
▸ warning No license field
▸ error Bad hash. Expected "b91d3e1cb824e577f531fedceeea4bec6c1c6f01" but got "da39a3ee5e6b4b0d3255bfef95601890afd80709"
cedar(dp-rm-create-release-testrelish|…) % h update
heroku-cli: Updating CLI... already on latest version: 6.7.3-9ecc815
@danp
danp / x.go
Last active May 5, 2016 20:10
package main
import (
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"strconv"
"strings"
@danp
danp / goimports
Last active September 10, 2015 14:24
godep-aware goimports and more
#!/bin/sh
# for use with emacs/vim/etc as goimports and goflymake
#
# I use it with config like:
#
# (setenv "GOPATH" (expand-file-name "~/Projects/go"))
# (setenv "PATH" "~/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:~/Projects/go/bin:/usr/local/go/bin")
# (setq exec-path (append exec-path (list (expand-file-name "~/Projects/go/bin") "/usr/local/go/bin")))
#
(require 'find-file-in-project)
(setq-default ffip-project-file '(".git" "Rakefile" "Gemfile" "Godeps"))
(setq-default ffip-patterns '("*"))
(setq-default ffip-prune-patterns '("Godeps"))
(setq-default ffip-limit 10000000)
(global-set-key (kbd "s-t") 'find-file-in-project)
@danp
danp / main.go
Created September 4, 2014 13:31
package main
import (
"bufio"
"crypto/sha1"
"fmt"
"image"
"io"
"os"
"os/exec"
+ git checkout master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
+ git branch -d old
Deleted branch old (was 208ceb0).
+ git checkout -b old 208ceb0f3033800f0560913497490888b9c1cacf
Switched to a new branch 'old'
+ rm -rf Godeps/_workspace/pkg
+ godep go install
+ git checkout master
@danp
danp / whatsup.sql
Created April 16, 2014 15:42
whatsup.sql
select
client_addr || ':' || client_port as client,
substr(query, 0, 100) as query,
waiting,
state,
now() - xact_start as xact_for
from
pg_stat_activity
where
state <> 'idle'
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
unsetopt beep
export PATH="/Applications/Postgres.app/Contents/Versions/9.3/bin:/usr/local/bin:/usr/local/google-cloud-sdk/bin:$PATH"
function cloud() {
eval "$(ion-client shell)"
cloud "$@"
-----BEGIN PGP MESSAGE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
hQIMA0wFwiUhlxJaAQ/+LwBUO2do8eNZwrKodDGtRT+45tC6pmg24NUoldzwjvSD
lxiuKx3bDlAjOXYeTa5jvKkYx2WL0DZFb2DIiePJVsObrLqYBQ4wj3k9/9PCrImH
uLqh5+PQsip9LluuwzjZuI5gdU48fKvLcLoifCNQIGy+zqwA68onvJUcslp7BvbX
V2bz/GMdB1u2feQ317Ysimd8+4vwX2Kix2W7cmn1EhfYaCqOf2mXgFwvfHOvH9zB
OwMC7yMFqcO+qHycAp3+XBxvhJYSWgoen0QXEddYtj0LaSh6tF1ygVSyhF6h0Oi5
npwwEeDBNwU/sEB8k4AheG1VUSLtHITfHIdGQ4plM+fgPZuhbCZLX/gI2V9FjS0u
jZEjhvYeeX3qhcaFcXCXHQrjuvwsIf8edaJX2RtdjFpoRIckRe9KxWz3pScjBMrA