Drop it in ~/bin
and use as following
vagrant@karas:~/git$ echo voluptatem%:doloribus | urlencode
voluptatem%25%3Adoloribus
.vagrant/ | |
git/ |
$ tree ~/.httpie/ | |
/Users/eiri/.httpie/ | |
├── config.json | |
└── sessions | |
└── localhost_5984 | |
└── default.json |
$ http :5984 | |
{ | |
“couchdb”: “Welcome”, | |
“uuid”: “6c77bce10369b93fa79b8488f1e25444”, | |
“vendor”: { | |
“name”: “Homebrew”, | |
“version”: “1.6.1_6” | |
}, | |
“version”: “1.6.1” | |
} |
-define(IS_OLD_STATE(S), tuple_size(S) /= tuple_size(#state{})). |
// 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 | |
} | |
} |
-module(demo). | |
-export([print/0]). | |
-record(magic_record, { | |
alpha = 1, | |
beta = b, | |
gamma = [x, y, z], | |
psy, | |
omega = "done" |
-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), |
#!/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 |
$ 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”, |
Drop it in ~/bin
and use as following
vagrant@karas:~/git$ echo voluptatem%:doloribus | urlencode
voluptatem%25%3Adoloribus