Skip to content

Instantly share code, notes, and snippets.

View wwqrd's full-sized avatar

Stephen wwqrd

  • United Kingdom
  • 08:04 (UTC +01:00)
View GitHub Profile
@wwqrd
wwqrd / gist:e7e5d7201cd2b6dde806
Created May 29, 2014 14:49
Prune tmux sessions
tmux list-sessions -F "#{session_name}:#{session_attached}"
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _git_status
set -l git_status (git status --porcelain -z)
if echo "$git_status" | grep -q -E '^$'
echo -n ' ○' # clean
else
echo -n " ● [^._.^]ノ"
@wwqrd
wwqrd / pairup.markdown
Last active August 29, 2015 13:57
Pairup blog post

Pairup

For the past few months I've been using tmux to manage my terminal sessions.

tmux is a terminal multiplexer, which allows you to manage multiple terminals within a single session.

One of the great features of tmux is session sharing. This means you can use it for pair programming if you both use a terminal-based text editor.

Using tmux for pair programming on a local machine (OS X)

@wwqrd
wwqrd / quit.sh
Last active August 29, 2015 13:57
Quit current tmux session (close session and detach)
tmux kill-session -t `tmux display-message -p "#S"`
@wwqrd
wwqrd / .tmux.conf
Created January 30, 2014 14:41
Starter tmux configuration
###########################
# Configuration
###########################
# use 256 term for pretty colors
set -g default-terminal "screen-256color"
# increase scroll-back history
set -g history-limit 5000
@wwqrd
wwqrd / micro.css
Created November 15, 2013 11:21
Clearfix
/* source: http://nicolasgallagher.com/micro-clearfix-hack/ */
/**
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* contenteditable attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that are clearfixed.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.
# settings
git config --global branch.autosetupmerge true
git config --global branch.autosetuprebase always
git config --global push.default tracking
# display
git config --global log.decorate short
git config --global color.ui auto
git config --global color.interactive auto
git config --global color.diff auto
data = [
{
name: series,
points: [ {}, .. ]
}
...
]
axis = new アシ({
ctx: ctx,
#!/usr/bin/env ruby
file="~/.gitshots/#{Time.now.to_i}.jpg"
unless File.directory?(File.expand_path("../../rebase-merge", __FILE__))
puts "Taking capture into #{file}!"
system "imagesnap -q -w 3 #{file} &"
end
exit 0
@wwqrd
wwqrd / post-commit
Created July 22, 2013 11:35
Post commit photo!
#!/usr/bin/env ruby
file="~/.gitshots/#{Time.now.to_i}.jpg"
unless File.directory?(File.expand_path("../../rebase-merge", __FILE__))
puts "Taking capture into #{file}!"
system "imagesnap -q -w 3 #{file} &"
end
exit 0