Skip to content

Instantly share code, notes, and snippets.

View jimnanney's full-sized avatar

Jim Nanney jimnanney

View GitHub Profile
@jimnanney
jimnanney / add_user.rb
Created November 23, 2012 16:35 — forked from elight/add_user.rb
#!/usr/bin/env ruby
CHARACTERS = (('A'..'Z').to_a + ('a'..'z').to_a + (0..9).to_a)
GROUP = 53
MY_MACHINE_DYNDNS_ADDRESS = "Put your DynDns DNS name here"
MY_SSH_PORT = "Your router's external port that will forward to SSH" # as a Fixnum
def ridiculous_password
(1..20).map do
#!/usr/bin/env ruby
def delete_ssh_user(username)
`rm -rf /Users/#{username}`
`dseditgroup -o edit -d #{username} -t user com.apple.access_ssh`
`dscl . -delete /Users/#{username}`
end
username = ARGV.shift
delete_ssh_user username
@jimnanney
jimnanney / tmux.conf
Created November 25, 2012 03:32
My tmux configuration
set -g prefix C-a
unbind C-b
set -s escape-time 1
set -g base-index 1
set -g pane-base-index 1
bind r source-file ~/.tmux.conf\; display "Reloaded!"
bind C-a send-prefix
bind | split-window -h
bind - split-window -v
bind h select-pane -L
@jimnanney
jimnanney / vimrc
Created November 26, 2012 00:19
My vimrc file
" This is Gary Bernhardt's .vimrc file
" vim:set ts=2 sts=2 sw=2 expandtab:
"call pathogen#runtime_append_all_bundles()
autocmd BufNewFile,BufRead *.vb set ft=vbnet
set number
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" BASIC EDITING CONFIGURATION
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
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
_ _ _
( ) _ ( ) (_ )
| | ( ) | | __ | | ___ _ ___ ___ __
| | | | | | /'__`\ | | /'___) /'_`\ /' _ ` _ `\ /'__`\
| (_/ \_) |( ___/ | | ( (___ ( (_) )| ( ) ( ) |( ___/
`\___x___/'`\____)(___)`\____)`\___/'(_) (_) (_)`\____)
I'm glad you could join me in my journey of learning Ruby, Rails, vim, and tmux. I am still new in so many regards, and I welcome your inputs, criticisms, and patience with my knowledge. I am sure we will both work well together.
@jimnanney
jimnanney / pairsetup.sh
Created June 11, 2013 05:10
First attempt at a script to create a pair programming user setup script.
#!/bin/bash
HOST=jimnanney
USER=$1
sudo su -c "useradd -m $USER"
sudo su $USER -c "mkdir -p ~/.ssh; \
chmod 700 ~/.ssh; \
curl https://github.com/$USER.keys >~/.ssh/authorized_keys; \
curl https://github.com/$HOST.keys >>~/.ssh/authorized_keys; \
chmod 600 ~/.ssh/authorized_keys"
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
@jimnanney
jimnanney / abcs_of_vim.txt
Created July 27, 2013 20:16
The ABC's of Vim
The abc's of Vim
a - Append
Changes from normal mode to insert mode appending after the character under the cursor
This is a useful thing to have when you wish to add to a word.
b - beginning of word (motion)
Moves the cursor to the beginning of a word.
@jimnanney
jimnanney / Ruby_On_Sails_After_Party.markdown
Created October 8, 2013 17:56
Ruby On Sails After Party

After Party

The after party location is finally confirmed and the details worked out. I am happy to annouce the after party for Ruby On Sails in Miami will be held at the Chart House Restaurant located next to Dinner Key Marina in Coconut Grove. The restuarant will be serving us their "Bayshore Menu" buffet style, with vegetarian options available. The party will start at 2pm and last until 6pm. Come join us for a fabulous time.