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
use_bpm 165 | |
##| Left Hand, Right Hand | |
define :time_loop do |loop_number, right_hand, left_hand| | |
loop_number.times do | |
play right_hand | |
play left_hand | |
sleep 1 | |
end | |
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
const data = { | |
Place: { | |
Name: 'Veracruz Tacos', | |
Address: '1704 E Cesar Chavez Austin, TX 78702', | |
Phone: '512.981.1760' | |
} | |
}; | |
let { Name, Address, Phone, PriceRange } = data.Place; |
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
// Received from API call | |
const data = { | |
Place: { | |
Name: 'Veracruz Tacos', | |
Address: '1704 E Cesar Chavez Austin, TX 78702', | |
Phone: '512.981.1760' | |
} | |
}; | |
// Without destructuring |
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
// Array destructure | |
let arr = [9, 8, 7, 6, 5, 4, 3, 2, 1]; | |
let [a, b, ...numbers] = arr; | |
console.log(a); // returns 9 | |
console.log(b); // returns 8 | |
console.log(numbers); // returns [7, 6, 5, 4, 3, 2, 1]; |
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
// Animation variables | |
var canvas = document.getElementById('canvas'); | |
var ctx = canvas.getContext('2d'); | |
var canvasWidth = canvas.width; | |
var canvasHeight = canvas.height; | |
//var base = new Image(); | |
// Paul Irish RequestAnimationFrame Gist https://gist.github.com/1579671 | |
(function() { | |
var lastTime = 0; |