Skip to content

Instantly share code, notes, and snippets.


Tobias Wasner wasnertobias

  • Europe/Germany/Bavaria
View GitHub Profile
View SmoothScroll-min.js
// SmoothScroll for websites v1.2.1
// Licensed under the terms of the MIT license.
// People involved
// - Balazs Galambosi (maintainer)
// - Michael Herf (Pulse Algorithm)
// - Tobias Wasner (optimized & minimized)
(function(){function c(){if(s)return;s=true;if(!document.body)return;var e=document.body;var r=document.documentElement;var a=window.innerHeight;var f=e.scrollHeight;o=document.compatMode.indexOf("CSS")>=0?r:e;u=e;var c=false;if(c){T("keydown",g)}if(l.keyboardSupport&&!c){x("keydown",g)}i=true;if(top!=self){n=true}else if(f>a&&(e.offsetHeight<=a||r.offsetHeight<=a)){var h=false;var p=function(){if(!h&&r.scrollHeight!=document.height){h=true;setTimeout(function(){"px";h=false},500)}};"auto";setTimeout(p,10);if(o.offsetHeight<=a){var d=document.createElement("div");"both";e.appendChild(d)}}if(!l.fixedBackground&&!t){"scroll";"scroll"}}function v(e,t,n,r){r||(r=1e3);C(t,n);i
View untrusted-lvl12-solution.js
* 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
View untrusted-lvl11-solution.js
* 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
View untrusted-lvl10-solution.js
* ambush.js *
* Oh. Oh, I see. This wasn't quite part of the plan.
* Looks like they won't let you take the Algorithm
* without a fight. You'll need to carefully weave your
* way through the guard drones.
View untrusted-lvl1-solution.js
* cellBlockA.js *
* Good morning, Dr. Eval.
* It wasn't easy, but I've managed to get your computer down
* to you. This system might be unfamiliar, but the underlying
* code is still JavaScript. Just like we predicted.
View untrusted-lvl2-solution.js
* theLongWayOut.js *
* Well, it looks like they're on to us. The path isn't as
* clear as I thought it'd be. But no matter - four clever
* characters should be enough to erase all their tricks.
function startLevel(map) {
View untrusted-lvl3-solution.js
* validationEngaged.js *
* They're really on to us now! The validateLevel function
* has been activated to enforce constraints on what you can
* do. In this case, you're not allowed to remove any blocks.
* They're doing all they can to keep you here. But you
* can still outsmart them.
View untrusted-lvl4-solution.js
* multiplicity.js *
* Out of one cell and into another. They're not giving you
* very much to work with here, either. Ah, well.
* Level filenames can be hints, by the way. Have I
* mentioned that before?
View untrusted-lvl5-solution.js
* minesweeper.js *
* So much for Asimov's Laws. They're actually trying to kill
* you now. Not to be alarmist, but the floor is littered
* with mines. Rushing for the exit blindly may be unwise.
* I need you alive, after all.
* If only there was some way you could track the positions
View untrusted-lvl6-solution.js
* 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!