This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# 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 | |
## | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Socket.gethostname.gsub(/\.local/,'').downcase |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var architects = [] | |
$.getJSON("/architects.json", function(data) { | |
$.each(data.items, function(i,item){ | |
architects.push(item.reverse_name); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var architects = [] | |
$.getJSON("/architects.json", function(data) { | |
$.each(data, function(i, item) { | |
architects.push(item.architect.reverse_name); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var functions = [] | |
$.getJSON("/functions.json", function(data) { | |
$.each(data, function(i, item) { | |
functions.push(item.function.name); | |
}); | |
$("#functions_list").autocomplete(functions); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clear logs when booting server locally | |
# so they don't grow to be 1GB in size | |
if RAILS_ENV == 'development' | |
f = File.open("#{RAILS_ROOT}/log/development.log", "w") | |
f.close | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.message_block { | |
clear: both; | |
margin: 12px 0; | |
} | |
.message_block ul { | |
border-bottom: 1px solid #ecd757; | |
border-top: 1px solid #ecd757; | |
list-style: none; | |
padding: 10px; |
OlderNewer