Skip to content

Instantly share code, notes, and snippets.

View heliostatic's full-sized avatar

Ben Lee-Cohen heliostatic

View GitHub Profile
@jlindsey
jlindsey / xml2json
Created March 24, 2010 19:58
A super simple XML to JSON file converter
#! /usr/bin/env ruby
require 'rubygems'
require 'active_support'
require 'json'
require 'commander/import'
program :name, "xml2json"
program :version, "1.1.0"
program :description, "XML to JSON converter"
@njvitto
njvitto / deploy.rake
Created April 11, 2010 16:56 — forked from RSpace/deploy.rake
Rakefile to deploy and rollback to Heroku in two different environments (staging and production) for the same app
#Deploy and rollback on Heroku in staging and production
task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
namespace :deploy do
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU'
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU'
task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag]
task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on]
@juggy
juggy / call_template.rb
Created May 17, 2011 19:25
Render a complete page in rails 3 without controller
# create the template
template = PageOfflineTemplate.new
template.quote = quote
template.pages = quote.build_pages
# Here I render a template with layout to a string then a PDF
pdf = PDFKit.new template.render_to_string(:template=>"quotes/review.html.haml")
@zspencer
zspencer / sinatra_base.rb
Created June 9, 2011 06:26
Code Review of sinatra/base.rb
# external dependencies
require 'rack'
require 'tilt'
# stdlib dependencies
require 'thread'
require 'time'
require 'uri'
# other files we need
@jpantuso
jpantuso / osx_lion_rail_setup.md
Created July 27, 2011 19:51
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, rails, and MySQL
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@grosser
grosser / rails_admin_without_devise.md
Last active July 27, 2016 06:25 — forked from huned/rails_admin_without_devise.md
Using RailsAdmin without devise

Using rails_admin without devise

Add RailsAdmin to your Gemfile

do NOT add devise

gem "rails_admin", :git => "git://github.com/sferik/rails_admin.git"

Bundle

@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts
@saetia
saetia / gist:1623487
Last active May 1, 2024 19:55
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@betamatt
betamatt / Procfile
Created January 26, 2012 23:29
Running delayed_job with foreman
queue: ./queue.sh