Skip to content

Instantly share code, notes, and snippets.

View CaptainJojo's full-sized avatar

Jonathan Jalouzot CaptainJojo

View GitHub Profile
anonymous
anonymous / untrusted-lvl11-solution.js
Created April 17, 2014 10:19
Solution to level 11 in Untrusted: http://alex.nisnevich.com/untrusted/
/*
* robot.js
*
* You'll need three keys in order to unlock the
* Algorithm: the red key, the green key, and the
* blue key. Unfortunately, all three of them are
* behind human-proof barriers.
*
* The plan is simple: reprogram the maintenance
* robots to grab the key and bring it through
anonymous
anonymous / untrusted-lvl9-solution.js
Created April 17, 2014 10:07
Solution to level 9 in Untrusted: http://alex.nisnevich.com/untrusted/
/**********************
* fordingTheRiver.js *
**********************
*
* And there's the river. Fortunately, I was prepared for this.
* See the raft on the other side?
*
* Everything is going according to plan.
*/
anonymous
anonymous / untrusted-lvl8-solution.js
Created April 17, 2014 09:59
Solution to level 8 in Untrusted: http://alex.nisnevich.com/untrusted/
/*******************
* intoTheWoods.js *
*******************
*
* Ah, you're out of the woods now. Or into the woods, as the
* case may be.
*
* So take a deep breath, relax, and remember what you're here
* for in the first place.
*
anonymous
anonymous / untrusted-lvl7-solution.js
Created April 17, 2014 09:55
Solution to level 7 in Untrusted: http://alex.nisnevich.com/untrusted/
/*************
* colors.js *
*************
*
* You're almost at the exit. You just need to get past this
* color lock.
*
* Changing your environment is no longer enough. You must
* learn to change yourself. I've sent you a little something
* that should help with that.
anonymous
anonymous / untrusted-lvl6-solution.js
Created April 17, 2014 09:33
Solution to level 6 in Untrusted: http://alex.nisnevich.com/untrusted/
/****************
* drones101.js *
****************
*
* Do you remember, my dear Professor, a certain introductory
* computational rationality class you taught long ago? Assignment
* #2, behavior functions of autonomous agents? I remember that one
* fondly - but attack drones are so much easier to reason about
* when they're not staring you in the face, I would imagine!
@ashblue
ashblue / nodejs-recursive-directory.js
Created October 19, 2012 05:06
NodeJS recursive directory listing without a module package
/**
* Goes through the given directory to return all files and folders recursively
* @author Ash Blue ash@blueashes.com
* @example getFilesRecursive('./folder/sub-folder');
* @requires Must include the file system module native to NodeJS, ex. var fs = require('fs');
* @param {string} folder Folder location to search through
* @returns {object} Nested tree of the found files
*/
// var fs = require('fs');
function getFilesRecursive (folder) {