This file contains hidden or 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
faces = [🤖, 🐢, 🐼, 🐙, 👾, 👹, 🐢, 👾, 😱, 🤖, 🐲, 🐙, 😱, 👹, 🐼, 🐲] | |
matched = [] | |
picks = [] | |
choose(positionOfCard) function: | |
If the number of picks is 2: | |
Do nothing (stop the player from choosing 3 cards). | |
Add positionOfCard to picks. | |
If the number of picks is now 2: | |
check() |
This file contains hidden or 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
[ | |
{ | |
"name": "Finn the Human", | |
"image": "http://i.cdn.turner.com/v5cache/CARTOON/site/Images/i18/propd_at_char_finn.png", | |
"details": "Finn is a silly kid who wants to become a great hero one day. He might not look too tough, but if there's evil around, he'll slay it. That's his deal." | |
}, | |
{ | |
"name": "Jake the Dog", | |
"image": "http://i.cdn.turner.com/v5cache/CARTOON/site/Images/i18/propd_at_char_jake.png", | |
"details": "Finn's best friend is a wise, old dog with a big heart. Jake has the magical ability to stretch and grow. When evil's not running amok, he plays viola with his girlfriend, Lady Rainicorn." |
This file contains hidden or 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
convert -delay 10 -resize 800x600 -loop 0 *.png animation.gif |
This file contains hidden or 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 blob = new Blob([csvString]); | |
var a = window.document.createElement("a"); | |
a.href = window.URL.createObjectURL(blob, {type: "text/plain"}); | |
a.download = "filename.csv"; | |
// document.body.appendChild(a); | |
// a.click(); | |
// document.body.removeChild(a); |
This file contains hidden or 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 actors = new Array<Int>(); | |
var currentDepth = 0; | |
for(depth in frame.actors.keys()) { | |
var actor = frame.actors[depth].shape; | |
depth < currentDepth ? actors.unshift(actor) : actors.push(actor); | |
} |
This file contains hidden or 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
L = 0.15 | |
S = 8 | |
(S+1).times do |i| | |
time = (100.0 / S) * i | |
angle = ((360 / S) * i) | |
theta = ((angle % 360) * -1) * Math::PI / 180 | |
x = L * Math.cos(theta) - L * Math.sin(theta) | |
y = L * Math.sin(theta) + L * Math.cos(theta) |
This file contains hidden or 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 pcap from 'pcap'; | |
import ProtoBuf from 'protobufjs'; | |
import ByteBuffer from 'bytebuffer'; | |
import glob from 'glob'; | |
const protoPath = __dirname + "/../vendor/hs-proto"; | |
let root = {}; | |
let decoders = {}; |
This file contains hidden or 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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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 MIN = 1 | |
const MAX = 1000 | |
let guess, upper, lower, tries | |
const startGame = () => { | |
updateGame() | |
document.querySelector('#intro').style.display = 'none' | |
document.querySelector('#game').style.display = 'block' | |
} |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'net/http' | |
require 'json' | |
require 'cgi' | |
class Card | |
SUITS = [ | |
"Diamonds", | |
"Hearts", |