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
/***************** | |
* bossFight.js * | |
***************** | |
* | |
* NO FARTHER, DR. EVAL!!!! | |
* YOU WILL NOT GET OUT OF HERE ALIVE!!!! | |
* IT'S TIME YOU SEE MY TRUE FORM!!!! | |
* FACE MY ROBOT WRATH!!!!! | |
*/ |
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
/*************** | |
* pointers.js * | |
*************** | |
* | |
* You! How are you still alive? | |
* | |
* Well, no matter. Good luck getting through this | |
* maze of rooms - you'll never see me or the Algorithm again! | |
*/ |
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
/* | |
* robotNav.js | |
* | |
* The green key is located in a slightly more | |
* complicated room. You'll need to get the robot | |
* past these obstacles. | |
*/ | |
function startLevel(map) { | |
// Hint: you can press R or 5 to "rest" and not move the |
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
#!/bin/bash | |
START_TIME=1420099200000 # Unix timestamp | |
END_TIME=1592164819833 # Unix timestamp | |
INDEX=0 | |
PREFIX='drives' # name is up to you | |
BEARER_TOKEN="<fill-this-with-your-token>" | |
URL="https://api.automatic.com/trip/?started_at__gte=${START_TIME}&started_at__lte=${END_TIME}&limit=250" # limit cannot be > 250 I think | |
set_current_file () { | |
CURRENT="${PREFIX}_${INDEX}.json" |
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
#!/bin/bash | |
function testRecurse { | |
ONE=${1:0} | |
TWO=("${@:1}") | |
if [[ $# -eq 1 ]]; then | |
echo Final answer $ONE | |
else |
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
#/bin/bash | |
# Emoji / logging nonsense | |
SPACE=$'\xe2\x80\x83' | |
ERROR=$'\xF0\x9F\x94\xB4'$SPACE | |
INFO=$'\xF0\x9F\x94\xB5'$SPACE | |
OK=$'\xE2\x9C\x85'$SPACE | |
error() { echo "$ERROR $1"; } | |
warn() { echo "$INFO $1"; } | |
ok() { echo "$OK $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
/* global $ */ | |
function getInputs() { | |
return $('#stations-list li').map(function() { | |
return { | |
symbol: $(this).data('skey'), | |
name: $(this).text() | |
}; | |
}).toArray(); | |
} |
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
function guessDownloadDuration($cbz, MBps) { | |
if ($cbz.length === 0) { | |
return 0; | |
} | |
const rawValue = $cbz.parent().find('.right-align').contents().get(0).textContent; | |
if (rawValue.includes('MB')) { | |
const sizeInMb = parseFloat(rawValue.split('MB')[0].trim()); | |
const durationInMs = Math.round(sizeInMb / MBps * 1000); |
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
function track() { | |
var scrollCount = 0; | |
var fetching = false; | |
return function () { | |
if($(window).height() + $(window).scrollTop() >= $('.content').offset().top + $('.content').outerHeight() && !fetching) { | |
scrollCount += 100; | |
fetching = true; | |
$.ajax('http://sfbay.craigslist.org/search/bka' + ( scrollCount > 0 ? '?s='+scrollCount : '' )).then(function(x) { |
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 _ = require('underscore') | |
function sayHello() { | |
console.log('Hello, World'); | |
} | |
_.times(5, sayHello); | |
*/ | |
var image = [ | |
[1, 1, 1, 1, 1, 1, 1], |
NewerOlder