Skip to content

Instantly share code, notes, and snippets.

View jimnanney's full-sized avatar

Jim Nanney jimnanney

View GitHub Profile
@jimnanney
jimnanney / timeview.js
Created July 29, 2014 19:08
Learning Ember - Custom time view helper
// requires moment.js
App.TimeView = Ember.View.extend({
defaultTemplate: Ember.Handlebars.compile('{{view.content}}'),
tagName: 'time',
attributeBindings: ['datetime'],
datetime: new Date(),
format: 'DD-MMM-YYYY HH:ss',
content: function() {
var time = moment(this.get('datetime'));
@jimnanney
jimnanney / module-pattern.js
Created March 3, 2014 18:01
Revealing Module Pattern in javascript
var app = function() {
// private scoped variables
var privateData = "100";
var getData = function() {
return privateData;
};
// return an object with public properties
@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.

@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.
# 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 / 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"
_ _ _
( ) _ ( ) (_ )
| | ( ) | | __ | | ___ _ ___ ___ __
| | | | | | /'__`\ | | /'___) /'_`\ /' _ ` _ `\ /'__`\
| (_/ \_) |( ___/ | | ( (___ ( (_) )| ( ) ( ) |( ___/
`\___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.
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
@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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@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