emtest("😇") = "ߘ"
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
// ==UserScript== | |
// @name CoffeeTest | |
// @namespace test | |
// @version 0.1 | |
// @grant none | |
// @require http://jashkenas.github.io/coffee-script/extras/coffee-script.js | |
// @match http://example.iana.org/ | |
// ==/UserScript== | |
/* |
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
set -e | |
# Clean up previous test | |
rm log.log || true | |
rm -rf .git .hg .bup | |
# Specify how our file is going to be constructed | |
NUMS="00 01 02 03 04 05 06 07 08 09" | |
F1="00 " | |
F2="00 01 02 " |
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
``` | |
2013/11/22 18:15:26 2c9e825beb3b2c37d0a4d9c5625e10384bc6433c4a08a19b2092820a783bae4a: Failed to umount filesystem: Umount: Failed to umount /var/lib/docker/containers/2c9e825beb3b2c37d0a4d9c5625e10384bc6433c | |
4a08a19b2092820a783bae4a/rootfs | |
panic: runtime error: close of closed channel | |
goroutine 24 [running]: | |
runtime.panic(0x8eb1e0, 0x101f915) | |
/usr/local/go/src/pkg/runtime/panic.c:266 +0xb6 | |
github.com/dotcloud/docker.(*Container).monitor(0xc210062c40) | |
/go/src/github.com/dotcloud/docker/container.go:1232 +0x512 |
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
package main | |
import ( | |
"database/sql" | |
"database/sql/driver" | |
"net/http" | |
"runtime" | |
"time" | |
) |
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
dd if=/dev/urandom bs=1M count=1000 of=/tmp/bigfile | |
# Note! This will cause your computer to slow down while it puts | |
# all files it's accessing back in memory | |
sudo sync | |
sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches' | |
sleep 5 | |
dd if=/tmp/bigfile bs=1M of=/dev/null |
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
.PHONY: clean do | |
CFLAGS=-O0 -m32 | |
EMFLAGS=\ | |
--memory-init-file 0 | |
do: clean x.o y.o z.o | |
emar rc libtest.a y.o | |
emar rc libtest.a x.o | |
emranlib libtest.a |
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
int main(void) { | |
int x = EM_ASM_INT({ | |
Module.print('I received: ' + $0); | |
return $0 + 1; | |
}, 100) | |
return 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 http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.write('echo /'); | |
console.log('kill me now'); | |
setTimeout(function () { | |
res.write('tmp/xx\n'); | |
}, 50000); | |
}).listen(8080, '127.0.0.1'); | |
console.log('Server running at http://127.0.0.1:8080/'); |
It's over 9 years old (as of 2024-02-18), there are many better guides! You might like https://rust-unofficial.github.io/too-many-lists/
% Let's build a binary tree!
Let's build a binary tree of strings in Rust. To recap, each node in a binary tree:
- must have a value
OlderNewer