It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
All elements are CRLF
terminated. CRLF
in the examples mean additional CRLF
s.
Syntax | Type | null? | empty? | data/value |
---|---|---|---|---|
+ |
Simple string | no | + |
ASCII string, non-binary safe |
- |
Simple error string | no | - |
ASCII string, non-binary safe |
: |
Integer | no | no | ASCII-represented 64bit integer |
$(integer)CRLF(data) |
Bulk | $0CRLF |
$-1 |
Binary safe chunk of bytes |
*(integer) |
Array | *0 |
*-1 |
Array header holding a length/null indicator |
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 | |
if [ "$EUID" -ne 0 ] | |
then echo "Must be root" | |
exit | |
fi | |
if [[ $# -ne 1 ]]; | |
then echo "You need to pass a password!" | |
echo "Usage:" |
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 | |
# Why? Education & zero redis-cli dependecy | |
# (it is a shame, however, that this functionality isn't a part of redis-cli... PR on the way) | |
HOST=127.0.0.1 | |
PORT=6379 | |
if [ $# -lt "2" ] | |
then | |
echo "Call a Redis command with its last argument being file contents" | |
echo "Usage: $0 <Redis command> <keys and arguments for command> <payload>" |
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
# This file contains key-strings for every of the 16384 slot hashes in Redis Cluster | |
# Each line contains the string and a comment with the slot hash | |
# Make sure to trim the string so you don't include the whitespace before the # comment | |
# Comments start with a hash (#) | |
fyimk7v1CgnBo # Slot 0 | |
8HMdi # Slot 1 | |
IQhHSeAVHI # Slot 2 | |
N8mstVwJZoSaIg # Slot 3 | |
e2esUEU # Slot 4 | |
Yjj1RFQ5ME # Slot 5 |
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just
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
date | num_customers | distinct_customers | total_bananas | total_revenue | revenue_per_sale | |
---|---|---|---|---|---|---|
2016-01-01 | 345 | 287 | 564 | 3689 | 6.54 | |
2016-01-02 | 364 | 299 | 582 | 4080 | 7.01 | |
... | ... | ... | ... | ... | ... |
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
const I = x => x | |
const K = x => y => x | |
const A = f => x => f (x) | |
const T = x => f => f (x) | |
const W = f => x => f (x) (x) | |
const C = f => y => x => f (x) (y) | |
const B = f => g => x => f (g (x)) | |
const S = f => g => x => f (x) (g (x)) | |
const S_ = f => g => x => f (g (x)) (x) | |
const S2 = f => g => h => x => f (g (x)) (h (x)) |
- Format your storage
- Configure networking (it's easiest with LuCI, or just take a look at OpenWRT howtos)
- Configure
/storage
by adding proper options in/etc/config/fstab
, or, again, just clicking around in LuCI opkg update && opkg install tor
- Copy proper configuration, namely
/etc/tor/torrc
and/etc/config/uhttpd
- Reboot (or
/etc/init.d/uhttpd restart && /etc/init.d/tor restart
) - Check
/etc/tor/hidden_service/hostname
for your public.onion
address - ...
- PROFIT!