This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -s escape-time 0 | |
set -g base-index 1 | |
set -g bell-action any | |
set -g default-command "exec ${SHELL} -l" | |
set -g history-limit 10000 | |
set -g prefix C-t | |
set -g pane-active-border-fg black | |
set -g pane-active-border-bg black | |
set -g status-bg black | |
set -g status-fg white |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source-file /home/will/.tmux.conf | |
set-option -g status-right " " | |
new-window -dk -nMAIL -tmeta:1 'TERM=vt100 mutt' | |
new-window -d -nCOMMS -tmeta:2 'TERM=vt100 irssi' | |
new-window -d -nTRIAGE -tmeta:3 'triage ~/.triage/incoming' | |
new-window -d -nTODO -tmeta:4 'vi ~/.triage/incoming' | |
new-window -d -nSHELL -tmeta:5 | |
new-window -d -nWWW -tmeta:6 'elinks -session-ring 1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before = { | |
"key1" => {:type => "a"}, | |
"key2" => {:type => "a"}, | |
"key3" => {:type => "b"}, | |
} | |
after = Hash.new([]) | |
before.each{|k,v| after[v[:type]] <<= v} | |
after.each{|k,v| puts ">>> #{k} #{v.inspect}"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import optparse | |
import logging | |
import sys | |
log = logging.getLogger("your-logger") | |
# Usual logging boilerplate, unnecessary in Python >= 3.1. | |
try: | |
from logging import NullHandler | |
except ImportError: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>IP Tracker</title> | |
<style> | |
.bar { | |
border: 1px solid #ccc; | |
width: 600px; | |
background: white; | |
display: block; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import socket | |
>>> s = socket.socket(socket.AF_INET) | |
>>> s.bind(("127.0.0.1", 0)) | |
>>> s.bind(("10.0.0.1", 0)) | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "<string>", line 1, in bind | |
socket.error: [Errno 22] Invalid argument |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ dsh -gHOSTGROUP 'echo /sbin/service foo restart | sudo at now + $(hostname | hashrange 60) minutes' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
st = status -s | |
ci = commit | |
ca = commit -a | |
glog = log --oneline --decorate --graph | |
tags = tag -l | |
man = ls-files | |
bare = config --bool core.bare true | |
[mergetool] | |
prompt = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# unicode_literals + unittest2 will give you handy diffs when the test methods fail. | |
from __future__ import unicode_literals | |
try: | |
import unittest2 as unittest | |
except ImportError: | |
import unittest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Processing WelcomeController#index (for 10.0.2.2 at 2013-01-14 22:13:27) [GET] | |
Parameters: {"controller"=>"welcome", "action"=>"index"} | |
ActiveRecord::StatementInvalid (PG::Error: ERROR: relation "settings" does not exist | |
LINE 4: WHERE a.attrelid = '"settings"'::regclass | |
^ | |
: SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull | |
FROM pg_attribute a LEFT JOIN pg_attrdef d | |
ON a.attrelid = d.adrelid AND a.attnum = d.adnum | |
WHERE a.attrelid = '"settings"'::regclass |
OlderNewer