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
var deferWrap = function (f) { | |
return function () { | |
var cbs = []; | |
var d = function (cb) { | |
cbs.push(cb); | |
}; | |
var args = Array.prototype.slice.call(arguments); | |
args.push(d); | |
f.apply(this, args); |
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
# even with form helpers, creating forms is a pain in the butt | |
# for web developers every where. so... tedious... | |
# | |
# what if there was a better way? | |
# | |
# what if forms could... FIT... IN? | |
# | |
# what if forms conformed to the rest of your elegant rails workflow? | |
# that would be pretty nice is what i am thinking. | |
# |
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
$data['trackList'] = array( | |
(object) array( | |
'track_num' => 1, | |
'track_title' => 'You\'re No Good (feat. Santigold, Vybz Kartel, Danielle Haim & Yasmin)', | |
'track_time' => '4:32' | |
), | |
(object) array( | |
'track_num' => 2, | |
'track_title' => 'You\'re No Good (feat. Santigold, Vybz Kartel, Danielle Haim & Yasmin)', | |
'track_time' => '5:35' |
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
# config/initializers/paperclip.rb | |
####################################### | |
RACKSPACE_CONFIG = { | |
'production' => { | |
path: '', | |
storage: :fog, | |
fog_credentials: { | |
provider: 'Rackspace', | |
rackspace_username: ENV['RACKSPACE_USERNAME'], |
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
var curry = function (f, args, binding) { | |
if (typeof f !== 'function' || | |
toString.call(args) !== '[object Array]') { | |
throw new Error('Invalid parameters'); | |
return; | |
} | |
if (typeof binding !== 'object') { | |
binding = this; | |
} |
NewerOlder