Skip to content

Instantly share code, notes, and snippets.

View zph's full-sized avatar

Zander Hill zph

View GitHub Profile
#!/bin/sh
# Make pair user and add them to the pair group on box
### sudo adduser --disabled-password pair
# Add yourself to pair group on box
### sudo usermod -a -G pair zander
# Setup pair user with the following /home/pair/.bash_profile
### /home/pair/.bash_profile
##### https://gist.github.com/5726432
##### tmux -S /tmp/pair attach
#!/bin/sh
choose_sack_implementation(){
# If so, use prioritized wrapper
if [[ `which ag` ]]; then
command=`which sag`;
elif [[ `which ack` ]]; then
command=`which sack`;
elif [[ `which ack-grep` ]]; then
command=`which sack`
Hello! Glad we can get a pair session going. Here's some easy instructions to make things a bit easier.
Join the Google+ hangout and then make a ssh connection to my EC2 pair instance. I have copied your public key from github so you shouldn't need a password to login.
ssh pair@pair.jimnanney.com
Or if you add this to your ~/.ssh/config file you will be able to forward your keys to enable github checkout and in, and remotely view rails apps in your browser on your own machine and can just use the ssh command 'ssh pair' The local forwards allow you to view any rails app we work on within your own browser at localhost:3000 or 5000
Host pair
" Nab lines from ~/.pry_history (respects "count")
nmap <Leader>ph :<c-u>let pc = (v:count1 ? v:count1 : 1)<cr>:read !tail -<c-r>=pc<cr> ~/.pry_history<cr>:.-<c-r>=pc-1<cr>:norm <c-r>=pc<cr>==<cr>
" ↑ thanks to Houl, ZyX-i, and paradigm of #vim for all dogpiling on this one.
---
pairs:
zph:
name: ZPH
username: zph
email: Zander@civet.ws
al:
name: !ruby/string:HighLine::String |-
Vm0wd2QyUXlVWGxXYTFwUFZsZFNjRlZ0TVZOalJsWjBUVmM1VjFKdGVEQmFS
V2hyVmxVeFYyTkVRbFZXCmJVMHhWbXBHUzJNeVNrVlViR2hvQ2sxVmNGVldh
@zph
zph / import.rb
Created June 18, 2013 04:11 — forked from baldowl/import.rb
require 'rubygems'
require 'nokogiri'
require 'fileutils'
require 'date'
require 'uri'
# usage: ruby import.rb my-blog.xml
# my-blog.xml is a file from Settings -> Basic -> Export in blogger.
data = File.read ARGV[0]

Ruby MRI 1.9.3 Results

[gpetrie] $ ruby -v
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-darwin11.4.2]

[gpetrie] $ ruby wunderground.rb
Current temperature in Cedar Rapids is: 77.0
--- .tmux_twymer 2013-07-13 20:19:45.000000000 -0400
+++ .tmux.conf 2013-07-14 00:05:59.000000000 -0400
@@ -1,31 +1,69 @@
-# References:
-#http://mutelight.org/articles/practical-tmux
-# Use screen shortcut
-set-option -g prefix C-a
-
-# C-a twice to jump between windows
+# CAVEATS

Want to push to two Git Repos via a single command?

Want to do it easily via a simple .git edit?

My use case is pushing code that resides on Github as well as on Bitbucket. I want it available in both remote locations in case one is unavailable.

Here's how you do it:

Add the two remotes as normal

#!/usr/bin/env ruby
#
#
require 'json'
require 'open-uri'
require 'pry'
nonstandard_url = "http://xkcd.com/info.0.json"
start_url = "http://xkcd.com/1/info.0.json"
end_url = "http://xkcd.com/1243/info.0.json"