Skip to content

Instantly share code, notes, and snippets.

View mokolabs's full-sized avatar

Patrick Crowley mokolabs

View GitHub Profile
var architects = []
$.getJSON("/architects.json", function(data) {
$.each(data, function(i, item) {
architects.push(item.architect.reverse_name);
});
});
var architects = []
$.getJSON("/architects.json", function(data) {
$.each(data.items, function(i,item){
architects.push(item.reverse_name);
});
});
Getting this error when using heroku db:pull?
Mysql::Error MySQL server has gone away
The likely culprit is the default value for max_allowed_packet in MySQL on Snow
Leopard. By default this value is only 1M... buy by increasing it to 32M, you can
make this error go away.
To check the value of your max_allowed_packet size, just do this:
def next_meeting(now=1.day.from_now)
if Chronic.parse("1st thursday of this month", :context => :past, :now => now)
return Chronic.parse('1st thursday of next month', :now => now)
else
return Chronic.parse("1st thursday of this month", :now => now)
end
end
Socket.gethostname.gsub(/\.local/,'').downcase
%p
= link_to header_link_for(:name)
\|
= link_to header_link_for(:location)
\|
= link_to header_link_for(:screens)
def header_link_for(column)
column_name = column.to_s
##
# Calendar helper with proper events
# http://www.cuppadev.co.uk/webdev/making-a-real-calendar-in-rails/
#
# (C) 2009 James S Urquhart (jamesu at gmail dot com)
# Derived from calendar_helper
# (C) Jeremy Voorhis, Geoffrey Grosenbach, Jarkko Laine, Tom Armitage, Bryan Larsen
# Licensed under MIT. http://www.opensource.org/licenses/mit-license.php
##