Skip to content

Instantly share code, notes, and snippets.

@pjkelly
pjkelly / CinderellaDependencyFixes.md
Created April 29, 2013 20:48
Dealing with gem dependency issues when installing Cinderella v0.3.5.

Uninstall all messed up gems/dependencies

sudo gem uninstall net-ssh-gateway --all
sudo gem uninstall net-ssh-multi --all
sudo gem uninstall net-ssh --all
sudo gem uninstall moneta --all
sudo gem uninstall cinderella --all --executables
@pjkelly
pjkelly / Gemfile
Last active December 16, 2015 16:19
Syntax highlighting configuration for Middleman apps.
source 'https://rubygems.org'
ruby '1.9.3'
gem "slim"
gem "redcarpet"
gem "middleman", "~>3.0.6"
gem "middleman-syntax", ">=1.1.1"
gem "rubypython"
@pjkelly
pjkelly / CrushBackEndDeveloper.md
Created April 4, 2013 19:08
Back-end Developer Job Posting

Back-End Developer

We're seeking an experienced, enthusiastic Back-End Developer to join our team. You'll work closely with @_pjkelly and @createbang in crafting some of the finest web applications and APIs on the web.

The responsibilities

  • Working collaboratively with our highly skilled development team to turn ideas into reality using high quality Ruby and JavaScript
  • Participating in client meetings
  • Meeting internal and client deadlines
  • Keeping updated on new development methods and technologies
@pjkelly
pjkelly / _squares.rb
Last active December 15, 2015 15:49
Generate a grid of squares for betting on a game.
require 'axis'
set = (0..9).to_a
top = Axis.new('Top Numbers', set.dup)
side = Axis.new('Side Numbers', set.dup)
top.generate_values!
side.generate_values!
@pjkelly
pjkelly / example.md
Created December 14, 2012 19:34 — forked from anonymous/example.md
Unwrap text in Sublime Text.

Note: This assumes there are no spaces at the end of lines.

Example Text:

Praesent commodo cursus magna, vel scelerisque nisl
consectetur et. Nulla vitae elit libero, a pharetra
augue. Curabitur blandit tempus porttitor. Maecenas
faucibus mollis interdum. Donec ullamcorper nulla
non metus auctor fringilla. Cras mattis consectetur
window.AppName =
Models: {}
Colls: {}
Views: {}
Routers: {}
Data: {}
Pages:
Home:
init: ->
new AppName.Views.HomePage el: $("body")
@pjkelly
pjkelly / install.md
Created August 24, 2012 18:30
Install REE on Mountain Lion with rbenv
  1. Make sure you've install X11 from here: http://xquartz.macosforge.org/landing/.
  2. Set CPPFLAGS environment variable:

$ export CPPFLAGS=-I/opt/X11/include 3. Find gcc-4.2 on your system:

$ which gcc-4.2
=> /Users/pjkelly/Developer/bin/gcc-4.2
@pjkelly
pjkelly / instructions.md
Created February 27, 2012 07:57
Crush + Lovely Development Environment Setup for Mac OS X Lion

Before you start

These instructions work best on a fresh system. While I've gotten them to work on a system where I just upgraded from Snow Leopard to Lion and had a previously working development environment (using an older version of Cinderella in my case), it was not without difficulty. It's much easier to start from scratch.

These instructions are for Mac OS X 10.7.x (Lion) only.

SSH Keys

If you have SSH keys setup already

@pjkelly
pjkelly / example.rb
Created July 21, 2011 02:16
JSON Encoding in Rails 1.2.x
# In Rails 1.2.x, the default JSON encoder doesn't quote
# attributes. To force quoting, set the following option
# to false. From the ActiveSupport::JSON docs:
#
# When +true+, Hash#to_json will omit quoting string or symbol keys
# if the keys are valid JavaScript identifiers. Note that this is
# technically improper JSON (all object keys must be quoted), so if
# you need strict JSON compliance, set this option to +false+.
# mattr_accessor :unquote_hash_key_identifiers
# @@unquote_hash_key_identifiers = true
@pjkelly
pjkelly / import.rb
Created July 21, 2011 02:16
Converting JSON to Google Spreadsheets
require 'rubygems'
require 'yajl'
require 'to_google_spreadsheet'
json = File.new('sizes.json', 'r') # file with more than one json
parser = Yajl::Parser.new
data = parser.parse(json)
GoogleSpreadsheet.config do |c|
c.email = "me@there.com"