View gist:9776526
unbind |
bind | split-window -hc "#{pane_current_path}"
unbind -
bind - split-window -vc "#{pane_current_path}"
bind 'c' new-window -c "#{pane_current_path}"
View a.rb
$('.file .meta').each(function(i, node) {
var p = $(node).parents('.file'),
filename = $(node).
find('.js-selectable-text').
text().
replace(/(^\s+|\s+$)/g,'');
if (!/\.rb$/i.test(filename)) {
p.find('.data').toggle();
p.find('.image').toggle();
View go-coveralls
#!/bin/sh
COV_PARTIAL_FILE=profile.cov.out
COV_FILE=profile-all.cov.out
COV_MODE=count
HEADER="mode: $COV_MODE"
if which gxargs > /dev/null; then
XARGS=gxargs
View go-see-coverage-now.sh
cover () {
COV="/tmp/go-coverage.$$.out"
go test -covermode=count -coverprofile=$COV $@ && go tool cover -html=$COV && unlink $COV
}
View docker-admin.sh
docker-ls-volumes() {
docker inspect $1 | jq '.[] | .Volumes'
}
docker-ls-ports() {
docker inspect $1 | jq '.[] | .NetworkSettings.Ports'
}
View myrepo.awk
BEGIN {
FS = "\n";
"whoami" | getline user
}
{
if (system("test -d \"" $1 "/.git\"") != 0) {
next
}
View gomain.sh
gomain() {
local f="/tmp/gomain-$$/main.go"
mkdir -p $(dirname $f)
cat <<_EOF_ > $f
package main
import (
"fmt"
)
View tmux-add-format-for-session-activity.patch
diff --git a/format.c b/format.c
index 776de96..2ef5b84 100644
--- a/format.c
+++ b/format.c
@@ -503,6 +503,12 @@ format_defaults_session(struct format_tree *ft, struct session *s)
*strchr(tim, '\n') = '\0';
format_add(ft, "session_created_string", "%s", tim);
+ t = s->activity_time.tv_sec;
+ format_add(ft, "session_activity", "%lld", (long long) t);
View twitter_fav.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys, tweepy, urllib, urllib2, simplejson
consumer_key = ""
consumer_secret = ""
access_key = ""
access_secret = ""
def getAuth():
auth = tweepy.OAuthHandler(consumer_key,consumer_secret)
auth.set_access_token(access_key,access_secret)
View proccessing_on_canvas.py
<!DOCTYPE html>
<html>
<head>
<title>Processing</title>
<meta charset="utf-8">
</head>
<body>
<canvas width="500" height="400"></canvas>
<script src="js/processing-1.1.0.min.js"></script>