View Getcolors
require 'rmagick'
class GetColors
def initialize(image, brand, campaign=nil)
@image = image
@brand = brand
@campaign = campaign
View binnacle-heroku-add-on-test-instructions.asc
View Contract Killer

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post


Ubuntu Precise Rails, Nginx, Unicorn and Capistrano ('2.15.5') Server Setup

I originally tried to use the ~> 3.0 version of Capistrano, but fell back to the 2.15.5 version. There were a lot of changes in the new version that I did not feel like learning right at the moment...

1. Setup deploy user

First we will create a new user for deployment:

$  ssh into your server
View gist:8328248
set -u
set -e
# Example init script, this can be used with nginx, too,
# since nginx and unicorn accept the same signals
# Feel free to change any of the following variables for your app:
View activity_log
Refine results by Organization
= select_tag 'search[query]', options_for_select(@organizations), class: 'chosen-select', prompt: "Search for organization to select", id: 'org-selection'
%th Date
View challenge.rb
((15, 'less_than', 30) == true)
View js-welcome-full
function checkForWelcome() {
var userWelcome = "#{@current_user.hide_welcome}";
if (userWelcome == "false") {
View bobs_ruby_snippets
These two snippets can be copy/pasted into a Sublime Text 2 new snippet and saved as a [.]sublime-snippet
To create <%= <cursor> %> use rb=+tab
<content><![CDATA[<%= ${1} %>]]></content>
<description><%=… %></description>
View unicorn
/usr/sbin/update-rc.d -f unicorn defaults
chmod +x /etc/init.d/unicorn
/usr/sbin/update-rc.d -f unicorn remove