We want to create a function that will add numbers together when called in succession.
add(1)(2) == 3 // true
We also want to be able to continue to add numbers to our chain.
add(1)(2)(3) == 6 // true
We want to create a function that will add numbers together when called in succession.
add(1)(2) == 3 // true
We also want to be able to continue to add numbers to our chain.
add(1)(2)(3) == 6 // true
<keyboard> | |
<!-- resize windows with Alt + Direction --> | |
<keybind key="A-Right"> | |
<action name="GrowToEdgeEast"/> | |
</keybind> | |
<keybind key="A-Left"> | |
<action name="GrowToEdgeWest"/> | |
</keybind> | |
<keybind key="A-Down"> | |
<action name="GrowToEdgeSouth"/> |
# http://domain.com -> https://www.domain.com | |
# http://www.domain.com -> https://www.domain.com | |
server { | |
listen 80; | |
server_name domain.com www.domain.com; | |
return 301 https://www.domain.com$request_uri; | |
} | |
# https://domain.com -> https://www.domain.com | |
server { |
var fs = require('fs'), | |
path = require('path') | |
var listFiles = function(dir, next){ | |
fs.readdir(dir, function(err, nodes){ | |
if (err) next(err) | |
next(null, nodes.filter(function(node){ | |
return fs.lstatSync(path.resolve(dir) + "/" + node).isFile() | |
})) | |
}) |
To run bunch of Minitest tests in one go, without using Rake, use this command
$ ruby -e 'ARGV.each { |path| require "./#{path}" }' test/*.rb
test "the Ember.RSVP.Promise works", -> | |
promise = new Ember.RSVP.Promise((resolve, reject) -> | |
Ember.run(null, resolve, "value") | |
) | |
Ember.run => | |
promise.then (actual) -> | |
equal(actual, 'value', 'promise resolved with "hello"') |
{ | |
"artists": [ | |
"parov stelar", | |
"proleter", | |
"goldfish", | |
"tape five", | |
"movits", | |
"odjbox" | |
] | |
} |