Erlang/OTP 17 [erts-6.4.1.2] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V6.4.1.2 (abort with ^G)
1> c(zombie_timer).
{ok,zombie_timer}
2> zombie_timer:main().
-. start timer {1458135323982793,#Ref<0.0.0.79>} from <0.40.0>
-. loop is <0.40.0>
1. <0.40.0>
Drop it in ~/bin
and use as following
vagrant@karas:~/git$ echo voluptatem%:doloribus | urlencode
voluptatem%25%3Adoloribus
This file contains hidden or 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
$ curl $db/neato -XPUT | |
{“ok”:true} | |
$ curl $db/neato -XPOST -H’Content-Type: application/json’ -d’{“key”: 1}’ | |
{“ok”:true,”id”:”b24a8da105719f433651feabff001d5d”,”rev”:”1-c77eb5d5af83163c996ea42b61a9f0d8”} | |
$ curl $db/neato/b24a8da105719f433651feabff001d5d -G -s | jq . | |
{ | |
“_id”: “b24a8da105719f433651feabff001d5d”, | |
“_rev”: “1-c77eb5d5af83163c996ea42b61a9f0d8”, |
This file contains hidden or 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
#!/bin/bash | |
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/ | |
# | |
ARGS=2 | |
E_BADARGS=99 | |
if [ $# -ne $ARGS ] # correct number of arguments to the script; | |
then |
This file contains hidden or 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
-module(mardear). | |
-export([readram/0]). | |
readram() -> | |
{ok, Fd} = file:open([], [ram, write, read]), | |
IoData = io_lib:format("~s", [[$r, $a, $m]]), | |
ok = file:write(Fd, IoData), | |
{ok, Str} = file:pread(Fd, 0, 8192), | |
ok = file:close(Fd), |
This file contains hidden or 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
-module(demo). | |
-export([print/0]). | |
-record(magic_record, { | |
alpha = 1, | |
beta = b, | |
gamma = [x, y, z], | |
psy, | |
omega = "done" |
This file contains hidden or 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
// Returns a random Emoji 🌿 | |
extension String{ | |
func randomEmoji()->String{ | |
let range = 0x1F601...0x1F64F | |
let ascii = range.startIndex + Int(arc4random_uniform(UInt32(range.count))) | |
let emoji = String(UnicodeScalar(ascii)) | |
return emoji | |
} | |
} |
This file contains hidden or 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
-define(IS_OLD_STATE(S), tuple_size(S) /= tuple_size(#state{})). |
This file contains hidden or 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
$ http :5984 | |
{ | |
“couchdb”: “Welcome”, | |
“uuid”: “6c77bce10369b93fa79b8488f1e25444”, | |
“vendor”: { | |
“name”: “Homebrew”, | |
“version”: “1.6.1_6” | |
}, | |
“version”: “1.6.1” | |
} |
This file contains hidden or 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
$ tree ~/.httpie/ | |
/Users/eiri/.httpie/ | |
├── config.json | |
└── sessions | |
└── localhost_5984 | |
└── default.json |