Skip to content

Instantly share code, notes, and snippets.

go build -o ./zkcli ./main.go
main.go:20:2: cannot find package "github.com/go-zkcli/zkcli/output" in any of:
/usr/local/Cellar/go/1.4.2/libexec/src/github.com/go-zkcli/zkcli/output (from $GOROOT)
/usr/local/Cellar/go/1.4.2/src/github.com/go-zkcli/zkcli/output (from $GOPATH)
/Users/hopson/src/zkcli/src/github.com/go-zkcli/zkcli/output
main.go:21:2: cannot find package "github.com/go-zkcli/zkcli/zk" in any of:
/usr/local/Cellar/go/1.4.2/libexec/src/github.com/go-zkcli/zkcli/zk (from $GOROOT)
/usr/local/Cellar/go/1.4.2/src/github.com/go-zkcli/zkcli/zk (from $GOPATH)
/Users/hopson/src/zkcli/src/github.com/go-zkcli/zkcli/zk
main.go:23:2: cannot find package "github.com/outbrain/golib/log" in any of:
@hopson
hopson / .vimrc
Created September 24, 2012 03:55
" Never, ever do that annoying matchparen thing:
let g:loaded_matchparen = 1
set background=dark
set nocompatible
set textwidth=0
set nobackup
set ruler
set showmatch
@hopson
hopson / .vimrc
Created September 24, 2012 03:53
" Never, ever do that annoying matchparen thing:
let g:loaded_matchparen = 1
set background=dark
set nocompatible
set textwidth=0
set nobackup
set ruler
set showmatch
@hopson
hopson / .vimrc
Created September 24, 2012 03:52
" Never, ever do that annoying matchparen thing:
let g:loaded_matchparen = 1
set background=dark
set nocompatible
set textwidth=0
set nobackup
set ruler
set showmatch
@hopson
hopson / gist:2002514
Created March 8, 2012 18:28
Reload localhost tabs in chrome
set tabcount to 0
tell application "Google Chrome"
repeat with win in windows
repeat with tb in win's tabs
set urlstr to tb's URL
if urlstr contains "http://localhost" then
tell tb to reload
set tabcount to 1
end if
end repeat
@hopson
hopson / gist:1959543
Created March 2, 2012 16:39
ell oh ell
class Welcome {
    use Who, Hello {
        hello::msg as public hi;
        Who::msg insteadof Hello;
    }
}
@hopson
hopson / .tmux.conf
Created February 10, 2012 20:12
tmux dawg
unbind C-b
set -g prefix C-a
setw -g mode-keys vi
bind C-a last-window
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind a send-keys C-a
def by_domain(domain=nil)
by_domains = {}
@stats.each do |bind_group, bg_values|
bg_values.each do |bind, b_values|
b_values.each do |b_domain, stats|
by_domains[b_domain] ||= {:active => 0, :delayed => 0}
by_domains[b_domain][:active] += stats[:active].to_i
by_domains[b_domain][:delayed] += stats[:delayed].to_i
end
end
# So, in erb templates and partials I want to use both @work_queue and @users.
# @work_queue is visible, but @users is not.
# Moving the declaration of @users to the protected method makes @users available.
# I don't understand the scoping.
# Fails when RAILS_ENV = test, success for development/production
class Queues::WorkQueuesController < ApplicationController
layout 'basic'
before_filter :find_work_queue, :only => [:show, :refresh_panes]
/*
What I Want:
The last (chronologically) status value for each item_id
*/
(root@localhost) [testo]> show create table t\G
*************************** 1. row ***************************
Table: t
Create Table: CREATE TABLE `t` (
`id` int(11) NOT NULL AUTO_INCREMENT,