Skip to content

Instantly share code, notes, and snippets.

@pjkelly
pjkelly / settings.json
Last active December 20, 2015 09:18
Sublime Text User Settings
{
"color_scheme": "Packages/Color Scheme - Default/Sunburst.tmTheme",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": false,
"folder_exclude_patterns": [
"log",
"tmp",
"backups",
"dump",
".git",
@pjkelly
pjkelly / 1-ruby-2-installation-steps.sh
Last active December 19, 2015 21:08
Installing Ruby 2 and making sure it works with OpenSSL.
brew update
brew upgrade rbenv
brew upgrade ruby-build
brew install openssl
brew link openssl --force
brew install curl-ca-bundle
CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl)" rbenv install 2.0.0-p247
@pjkelly
pjkelly / stats.json
Created July 2, 2013 02:21
New Stats JSON
{
"id": "51b95267f44092b6a5000004",
"last_updated_at": "2013-07-01T19:01:30-07:00",
"statistics": [
{
"id": "51b9665f64eb2bd988000003",
"type": "text",
"label": "<p><strong>Original ideas we have dared to imagine for our clients</strong></p>\n",
"data": [
"<p>Gnm</p>\n",
@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 / Readme.md
Created April 12, 2013 15:44
GitHub Flow: Keeping Feature Branches Up-to-Date & Merging Work Back Into Master

Keeping Feature Branches Up-to-Date & Merging Work Back Into Master

The basic flow is this:

  • When you want to update a feature branch you're working on, rebase on to it.
  • When you're ready to integrate the work you've been doing into the master branch, merge it.

Detailed Step-by-Step

Given the name of your feature branch is registration-page:

@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 / 1-How-We-Build-JSON-APIs-in-Rails.md
Last active April 25, 2022 10:19
Crush + Lovely Blog Posts

How We Build JSON APIs in Rails

Over the past few years, we've seen the projects we work on go from occasionally to almost always requiring a REST API. There are several reasons for this, all of them necessitating our ability to construct clean, performant APIs that are easy to work with:

  • More than ever, we are using client-side applications to provide rich, responsive interfaces.
  • The products we build span multiple platforms (web, iOS, Android, Blackberry) that all need to be kept in sync.
  • People and organizations have accumulated large amounts of data, and they need to have that data aggregated and/or sanitized so it can be used in new ways.

As a Ruby shop, we've always had a wide array of tools and libraries to choose from when building our applications. While this is most definitely a good problem to have, it's still a problem, and finding a combination of tools that made API development feel right to us took a few tries.

@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