[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
This file contains hidden or 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
#!/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 |
This file contains hidden or 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
#!/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` |
This file contains hidden or 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
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 |
This file contains hidden or 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
" 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. |
This file contains hidden or 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
--- | |
pairs: | |
zph: | |
name: ZPH | |
username: zph | |
email: Zander@civet.ws | |
al: | |
name: !ruby/string:HighLine::String |- | |
Vm0wd2QyUXlVWGxXYTFwUFZsZFNjRlZ0TVZOalJsWjBUVmM1VjFKdGVEQmFS | |
V2hyVmxVeFYyTkVRbFZXCmJVMHhWbXBHUzJNeVNrVlViR2hvQ2sxVmNGVldh |
This file contains hidden or 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
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] |
This file contains hidden or 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
--- .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
This file contains hidden or 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 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" |