Allen Fair afair

View keybase.md

Keybase proof

I hereby claim:

  • I am afair on github.
  • I am allenfair (https://keybase.io/allenfair) on keybase.
  • I have a public key whose fingerprint is F00B 3ED2 5CE8 F9AF 3D4A 55D9 1651 1D53 10AE 1388

To claim this, I am signing this object:

View gist:9648839
1 2 3 4 5 6 7 8 9 10
FactoryGirl.define do
factory :user do # class:User, aliases:[:name1, :name2]
name "Ruby"
date_of_birth { 21.years.ago } # Blocked called lazily at request time
association_factory_name
association :commenter, factory: :user, attrib:"value"
factory(:admin_user) do # Inheritance
admin true
end
View JsonMessages.js
1 2 3 4 5 6 7 8 9 10
var talk = {
 
title: "JSON Messaging: From REST and Beyond",
 
by: { name: "Allen Fair",
twitter: "@allenfair" },
 
event: { organization: "Philly.rb",
when: "August 12, 2013 23:00 UDT",
style: "☇ Lightning" },
View gist:5265874
1 2 3 4 5 6 7 8 9 10
==========================================
CURL COMMAND
==========================================
 
Format curl [options] [URL...]
 
OPERATIONS
-# --progress-bar
--environment
-f --fail (fail silently)
View RotateNumber.vim
1 2 3 4 5 6 7 8 9 10
" vimscript function to rotate line number setting from [On -> Relative -> Off], set to <Leader>n
" Author: Allen Fair, 2012
" License: Public Domain
 
function RotateNumber()
if &l:number
let &l:number=0
let &l:relativenumber=1
echom "Line Numbers"
elseif &l:relativenumber
View gist:3803895

Hey! I saw this has been indexed by the search engines. It is a first draft of a post I ended up publishing on my blog at: Scaling PostgreSQL With Pgpool and PgBouncer

Thanks for stopping by!

PostgreSQL and Pgpool Architecture

View tm.sh
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env bash
################################################################################
# Script to initiate (or connect to) a tmux session
###############################################################################
 
# Starts session and returns, or attaches to existing session name and exits.
function tm_session { # session name
#echo tmux start-server
tmux start-server
#echo tmux has-session -t $1
View bash.cheat
1 2 3 4 5 6 7 8 9 10
==========================================
BASH SCRIPTING ==========================================
========================================== TEST COMMAND
==========================================
Invoke: bash [options] file
Shebang: #!/usr/bin/env bash Test: test expression
In script: [ expression ]
========================================== Alternate: [[ espression ]]
LOOP Does not split string words
========================================== Does not expand pathglobs*
View tmux.cheat
1 2 3 4 5 6 7 8 9
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
 
List tmux ls List ^b w
New -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
View .gitconfig
1 2 3 4 5 6 7 8 9 10
[user]
name = Your Nmae
email = you@example.com
[core]
editor = vim
[color]
diff = auto
status = auto
branch = auto
ui = auto
Something went wrong with that request. Please try again.