Skip to content

Instantly share code, notes, and snippets.

➜ ~ echo "console.log(__dirname)" > /tmp/hello.js
➜ ~ node /tmp/hello.js
/tmp
➜ ~ mkdir /tmp/lol
➜ ~ echo "require('../hello')" > /tmp/lol/hello.js
➜ ~ node /tmp/lol/hello.js
/tmp
> var i = {
num: 1,
valueOf: function() {
return this.num++;
}
}
undefined
> i == 1 && i == 2 && i == 3
true

Keybase proof

I hereby claim:

  • I am SomeoneWeird on github.
  • I am SomeoneWeird (https://keybase.io/SomeoneWeird) on keybase.
  • I have a public key whose fingerprint is 9EFA EA49 1DC3 2C8B EFF3 882F 49D0 3933 B8D3 0994

To claim this, I am signing this object:

➜ ~ mongo
MongoDB shell version: 2.4.9
connecting to: test
> ObjectId()
ObjectId("530d38462efe0a7a137ee698")
> ObjectId( )
ObjectId("530d384f2efe0a7a137ee699")
> ObjectId( )
ObjectId("530d38592efe0a7a137ee69a")
> ObjectId( )
@SomeoneWeird
SomeoneWeird / gist:9242040
Created February 27, 2014 00:50
@deoxxa keybase test
-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP JS 0.0.1
Comment: https://keybase.io/crypto
wcBMA+UX1cZ+OsEeAQgAlI/EYVPqX2spVptCa6twujyx9eUF0X/ztrihsNHk3K1a
pCL5r7d2Mfe/ZJRuxAJygF7TyfuHz/f2lMc0n8szhBYuzT+ZT+SM8EULkk2xwFkA
ipGfdfvRepxSVyewm0mw1j9QSfXileiI0pVj5QmJHciF/YZL1DvfsoTqw/sbH2SK
nblgo0UlRJZq5JA4CEXnXjTZCkYEygJOl2YWmOVg2tFX6pEN9szwFgnGEdAVm5n7
MM3gichXsKrROKD7IDb63L6Qac5TpEXO4+NSVqwKFlq5bf14GtU7Ikvq+cWaUVjr
01cJ7Pz/wEhe3XoVqYfMMAHXaBenHmgcarYyrRL3qtJOAUTS8+m96jCnPuzTJDws
➜ express-gdata git:(master) npm install oauth
npm WARN install Refusing to install oauth as a dependency of itself
➜ express-gdata git:(master) node server.js
module.js:340
throw err;
^
Error: Cannot find module 'oauth'
/Users/adam/code/c/cjdns/node_build/builder.js:359
if (err) { throw err; }
^
Error: gcc -c -x cpp-output -o build_darwin/crypto_CryptoAuth_c.o -std=c99 -Wall -Wextra -Werror -Wno-pointer-sign -pedantic -D darwin=1 -Wno-unused-parameter -Wno-unused-result -fno-stack-protector -fstack-protector-all -Wstack-protector -D HAS_BUILTIN_CONSTANT_P -g -D NumberCompress_TYPE=v3x5x8 -D Identity_CHECK=1 -D Allocator_USE_CANARIES=1 -D PARANOIA=1 -D Log_DEBUG -fPIE -Wno-invalid-pp-token -Wno-dollar-in-identifier-extension -Wno-newline-eof -Wno-unused-value -Wno-tautological-compare build_darwin/crypto_CryptoAuth_c.o.i
crypto/CryptoAuth.c:50:22: error: unused variable 'keyHashSigma' [-Werror,-Wunused-const-variable]
static const uint8_t keyHashSigma[16] = "expand 32-byte k";
RangeError: Maximum call stack size exceeded
at Content.Object.defineProperty.get [as id] (http://127.0.0.1:8300/scripts/controllers/main.js:59:24)
at Content.Object.defineProperty.get [as id] (http://127.0.0.1:8300/scripts/controllers/main.js:59:40)
at Content.Object.defineProperty.get [as id] (http://127.0.0.1:8300/scripts/controllers/main.js:59:40)
at Content.Object.defineProperty.get [as id] (http://127.0.0.1:8300/scripts/controllers/main.js:59:40)
at Content.Object.defineProperty.get [as id] (http://127.0.0.1:8300/scripts/controllers/main.js:59:40)
at Content.Object.defineProperty.get [as id] (http://127.0.0.1:8300/scripts/controllers/main.js:59:40)
at Content.Object.defineProperty.get [as id] (http://127.0.0.1:8300/scripts/controllers/main.js:59:40)
at Content.Object.defineProperty.get [as id] (http://127.0.0.1:8300/scripts/controllers/main.js:59:40)
at Content.Object.defineProperty.get [as id] (http://127.0.0.1:8300/scripts/controllers/main.js:59:40)

crappy cpu

This is a stupidly simple implementation of a "CPU" for my own benefit.

Registers

26 storage registers available, A through Z.

#include <avr/io.h>
#include <util/delay.h>
int main (void) {
DDRB |= _BV(DDB4);
while(1) {
PORTB ^= _BV(PORTB4);
_delay_ms(500);
}