[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
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 [email protected] | |
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 |
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] |
#!/bin/sh | |
SPACE="SERVER$(spacefinder | sed 's/Current Space ID: //')" | |
mvim --serverlist | grep $SPACE | |
if [ $? -eq 1 ] | |
then | |
mvim --servername $SPACE $* | |
else | |
mvim --servername $SPACE --remote $* | |
fi |
Date: [[Date of Document]] Between [Our Company] and [Your Company]
We’re not big on formality, but sometimes it’s best to have a few simple things written down so that we’re all on the same page. In this contract you won’t find complicated legal terms or large passages of unreadable text. We have no desire to trick you into signing something that you might later regret. We do want what’s best for the safety of both parties, now and in the future.
require 'ripper' | |
def Object.const_missing(name) | |
klass = const_set name, Class.new | |
klass.class_eval do | |
def method_missing name, *args | |
file, line_num, _ = caller[0].split(':') | |
file_contents = File.open(file).read |
I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).
In Vim I have key bindings C-h/j/k/l
set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W
.) I'd like to use the same keystrokes for switching tmux panes.
An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\
.
Here's how it should work:
#!/usr/bin/env ruby | |
# A wrapper around "git commit" that provides a template message | |
# conforming to RentPath conventions. | |
# Assumes branches are named with the following components separated | |
# by underscores: | |
# 1. developer initials (one or more of these components are allowed) | |
# 2. story number | |
# 3. free text description (optional; may contain underscores) | |
# Examples: | |
# "sb_12345_fix_serious_bug" |
480 git commit -v | |
397 git status -sb | |
120 git add -p | |
53 git push | |
52 git diff | |
47 noglob bundle exec | |
45 ls -G | |
45 git branch -v | |
45 bundle | |
39 git push -u |