This file contains 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
// Import the following into your HTML | |
jquery.event.drag-2.2.js | |
jquery.event.drop-2.2.js | |
jquery.roundabout-shapes.min.js | |
jquery.roundabout.min.js | |
// Goes in watercolor.js |
This file contains 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
defaults: &defaults | |
api_key: r9g5t9reg09ergj | |
development: | |
<<: *defaults | |
test: | |
<<: *defaults | |
staging: |
This file contains 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
jQuery(window).load(function () { | |
jQuery("a.calendar_list").trigger("click"); | |
}); |
This file contains 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
filepicker.setKey('api_key'); | |
filepicker.pickMultiple({ | |
services: ['COMPUTER', 'DROPBOX' ] | |
}, | |
function(files){ | |
for (var i = 0; i < files.length; i++) { | |
var file = files[i]; | |
filepicker.store(file, { | |
path: '/attachments/'+formatFileName(file.filename), | |
mimetype: 'Content-Disposition: attachment; filename="'+file.filename+'"' |
This file contains 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
<iframe width="230" height="345" src="http://www.youtube.com/embed/5xNGPl3gq8Q" frameborder="0" allowfullscreen></iframe> |
This file contains 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
filepicker.setKey('api_key'); | |
filepicker.pickMultiple({ | |
services: ['COMPUTER', 'FTP', 'DROPBOX' ] | |
}, | |
function(files){ | |
for (var i = 0; i < files.length; i++) { | |
var file = files[i]; | |
filepicker.store(file, {path: '/attachments/'+file.key}); | |
} | |
} |
This file contains 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
json = ActiveSupport::JSON.decode(google)['predictions'] | |
# sort of traditional for() loop style | |
results = [] | |
json.each do |location| | |
results << { | |
:short => 'foo', | |
:long => 'bar' | |
} | |
end |
This file contains 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
jQuery.fn.retinafy = function() { | |
var root = (typeof exports == 'undefined' ? window : exports); | |
if (root.devicePixelRatio > 1) { | |
return this.each(function() { | |
$(this).hide(); | |
var image_src = $(this).attr("src"); | |
var extension = image_src.substr(image_src.lastIndexOf('.')); | |
var filename = image_src.substr(0, image_src.lastIndexOf('.')); | |
var retina_src = filename+'@2x'+extension; |
This file contains 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 ellipsisize(text, minimum_length=4,edge_length=3) | |
return text if text.length < minimum_length or text.length <= edge_length*2 | |
edge = '.'*edge_length | |
mid_length = text.length - edge_length*2 | |
text.gsub(/(#{edge}).{#{mid_length},}(#{edge})/, '\1...\2') | |
end |
This file contains 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
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Aenean lacinia bibendum nulla sed consectetur. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Sed posuere consectetur est at lobortis. Sed posuere consectetur est at lobortis. | |
[section_heading]Every little bit counts[/section_heading] | |
[donation_options description='Please choose a donation level. Paypal and credit card accepted.'] | |
[donation_option link="#" text="Yay!" amount="$5" color="color_1"] | |
[donation_option link="#" amount="$5" color="color_2"] | |
[donation_option link="#" amount="$15" color="color_3"] | |
[donation_option link="#" amount="$5" color="color_4"] | |
[donation_option link="#" amount="$5" color="color_5"] |