Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / untrusted-lvl17-solution.js
Created April 24, 2014 15:24
Solution to level 17 in Untrusted: http://alex.nisnevich.com/untrusted/
/***************
* 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!
*/
anonymous
anonymous / untrusted-lvl18-solution.js
Created April 24, 2014 15:43
Solution to level 18 in Untrusted: http://alex.nisnevich.com/untrusted/
/**********************
* superDrEvalBros.js *
**********************
*
* You're still here?! Well, Dr. Eval, let's see
* how well you can operate with one less dimension.
*
* Give up now. Unless you have a magic mushroom
* up your sleeve, it's all over.
*/
anonymous
anonymous / untrusted-lvl20-solution.js
Created April 24, 2014 16:18
Solution to level 20 in Untrusted: http://alex.nisnevich.com/untrusted/
/*****************
* 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!!!!!
*/
anonymous
anonymous / untrusted-lvl21-solution.js
Created April 24, 2014 16:25
Solution to level 21 in Untrusted: http://alex.nisnevich.com/untrusted/
/*
Objects can have the following parameters:
color: '#fff' by default
impassable: true if it blocks the player from movement (false by default)
onCollision: function (player, game) called when player moves over the object
onPickUp: function (player, game) called when player picks up the item
symbol: Unicode character representing the object
type: 'item' or null
*/
anonymous
anonymous / untrusted-lvl13-solution.js
Created April 25, 2014 02:13
Solution to level 13 in Untrusted: http://alex.nisnevich.com/untrusted/
/*
* robotMaze.js
*
* The blue key is inside a labyrinth, and extracting
* it will not be easy.
*
* It's a good thing that you're a AI expert, or
* we would have to leave empty-handed.
*/
@snuke
snuke / _readme.md
Last active August 29, 2015 14:03
モールス信号暗記ゲーム

-- --- .-. ... . -.-. --- -.. . --. .- -- .

なぜかモールス信号を覚えようと思って作ったゲームです。

なぜC++で作ったのか謎ですが、morse.cppを適当にコンパイルすると良いです。

1行目にMAX_LENという定数がありますが、これはtrainingモードで出てくるモールス信号の長さの制限です。

最初はこれを2にして始めて、覚えたら3にして、覚えたら4にして・・・とやると覚えやすいです。

@threeifbywhiskey
threeifbywhiskey / braille.c
Created August 1, 2014 20:01
This is an interpreter for the Braille esolang: http://esolangs.org/wiki/Braille
#include <stdio.h>
#include <stdlib.h>
unsigned char convert(unsigned char c)
{
return (c & 0x40) << 1
| (c & 0x07) << 4
| (c & 0x80) >> 4
| (c & 0x38) >> 3;
}
#include <stdio.h>
int main()
{
char *s;
switch (getchar()) {
do {
case '0':
s = "zero";
@ntddk
ntddk / x86_opcode
Created September 6, 2014 14:19
x86命令辞書
06 push es 独立語
07 pop es 独立語
0え push cs 独立語
16 push ss 独立語
17 pop ss 独立語
1え push ds 独立語
1f pop ds 独立語
27 daa 独立語
2f das 独立語
37 aaa 独立語