Skip to content

Instantly share code, notes, and snippets.

View joho's full-sized avatar
At harbour

John Barton joho

At harbour
View GitHub Profile
@joho
joho / Makefile
Last active December 27, 2015 08:39 — forked from toolmantim/Makefile
# A simple Makefile alternative to using Grunt for your static asset compilation
#
## Usage
#
# $ npm install
#
# And then you can run various commands:
#
# $ make # compile files that need compiling
# $ make clean all # remove target files and recompile from scratch
@joho
joho / gist:3735740
Created September 17, 2012 05:40 — forked from rafaelss/gist:3700977
PostgreSQL 9.2 upgrade steps
Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X)
(if you aren't using version 9.1.5, change line 6 with the correct version)
1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
2. mv /usr/local/var/postgres /usr/local/var/postgres91
3. brew update
4. brew upgrade postgresql
5. initdb /usr/local/var/postgres -E utf8
6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres
7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
@joho
joho / dabblet.css
Created May 18, 2012 06:48 — forked from anonymous/dabblet.css
Goodfilms New Header
/**
* Goodfilms New Header
*/
/* Rectangle 4: */
.box {
background: #FFA700;
width: 960px;
height: 100px;
@joho
joho / application.html.erb
Created September 5, 2011 06:24 — forked from mtcmorris/gist:1194204
Mustaches for everyone!!
<% if moustaches? %>
<script type="text/javascript">
$(document).ready(function() {
$(".thumbnail img").each(function() {
$(this).attr("src", "http://mustachify.me/?src=" + $(this).attr("src"));
});
});
</script>
<% end %>
1. Arcade Fire - The Suburbs
2. The Black Keys - Brothers
3. Frightened Rabbit - The Winter of Mixed Drinks
4. Jonsi - Go
5. Trent Reznor and Atticus Ross - The Social Network
6. Midlake - The Courage of Others
7. The Roots - How I Got Over
8. The National - High Violet
9. Kanye West - My Beautiful Dark Twisted Fantasy
10. Sia - We Are Born
def ¿
puts 'IMA UPSIDEDOWN QUESTIONMARK LOL'
end
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
@joho
joho / try.rb
Created June 7, 2010 05:54 — forked from ryan-allen/try.rb
try_do_thingo!
if thingo_worked_out?
sweet!
else
whatever!
end
def meh
class Array
def fuck_off_you_fucking_nil_cunts!
compact
end
end
class SignupController < ActionController::Base
def step_two
@signup = Signup.find(params[:id])
@signup.advance_step do |signup|
signup.attributes = params[:signup]
signup.save!
end
end
end
@joho
joho / gist:117894
Created May 26, 2009 04:34 — forked from yob/gist:117889
irb(main):005:0> n = "James"
=> "James"
irb(main):006:0> n.strip!
=> nil
irb(main):007:0> n
=> "James"
# that's just plain weird
>> n = "john "
=> "john "