Happy New Year!
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
class UsersController < ActionController::Base | |
def create | |
User.create(user_params) | |
end | |
private | |
def user_params | |
params.require(:email).permit(:first_name, :last_name, :shoe_size) |
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
14.5 Accept-Ranges | |
The Accept-Ranges response-header field allows the server to | |
indicate its acceptance of range requests for a resource: | |
Accept-Ranges = "Accept-Ranges" ":" acceptable-ranges | |
acceptable-ranges = 1#range-unit | "none" | |
Origin servers that accept byte-range requests MAY send |
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 arDrone = require("ar-drone"); | |
var client = arDrone.createClient(); | |
client.takeoff(); | |
client | |
.after(5000, function() { | |
this.clockwise(0.5); | |
}) | |
.after(3000, function() { |
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
Leap = require("leapjs"); | |
var arDrone = require("ar-drone"); | |
var client = arDrone.createClient(); | |
var aloft = false; | |
Leap.loop(function(frame) { | |
var x, y, z; |
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
npm install jashkenas/coffeescript |
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
nvm install 0.11 | |
nvm use 0.11 |
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
curl https://raw.githubusercontent.com/creationix/nvm/v0.17.3/install.sh | bash | |
source ~/.nvm/nvm.sh |
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
parallel = require "when/parallel" | |
resource = require "shred" | |
module.exports = (urls...) -> parallel (resource(url) for urls in url) |
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
context.test "Using a full URL for a nested resource", (context) -> | |
{data} = yield github | |
.repo | |
.issues("https://api.github.com/repos/pandastrike/shred/issues") | |
.list() | |
assert.equal type(yield data), "array" |