jq is useful to slice, filter, map and transform structured json data.
brew install jq
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 |
#!/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:" |
#!/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 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
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 | |
... | ... | ... | ... | ... | ... |
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)) |
/storage
by adding proper options in /etc/config/fstab
, or, again, just clicking around in LuCIopkg update && opkg install tor
/etc/tor/torrc
and /etc/config/uhttpd
/etc/init.d/uhttpd restart && /etc/init.d/tor restart
)/etc/tor/hidden_service/hostname
for your public .onion
address--- Activities configurator --- | |
https://extensions.gnome.org/extension/358/activities-configurator/ | |
--- Alternatetab --- | |
https://extensions.gnome.org/extension/15/alternatetab/ | |
--- Battery status --- | |
https://extensions.gnome.org/extension/817/battery-status/ | |
--- Coverflow alt-tab --- |