Skip to content

Instantly share code, notes, and snippets.

View markuman's full-sized avatar
🐧
Linux Only - fail fast, move on

Markus Bergholz markuman

🐧
Linux Only - fail fast, move on
  • Lekker Energie GmbH
  • Berlin
View GitHub Profile
@olih
olih / jq-cheetsheet.md
Last active May 10, 2025 20:55
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@mp911de
mp911de / Redis RESP.md
Created March 28, 2016 14:59
Redis RESP summary

All elements are CRLF terminated. CRLF in the examples mean additional CRLFs.

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
@atlury
atlury / rPi3-ap-setup.sh
Created March 20, 2016 09:20 — forked from Lewiscowles1986/rPi3-ap-setup.sh
Raspberry Pi 3 access-point-setup
#!/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>"
@mp911de
mp911de / Redis Cluster Keys for all slot hashes.txt
Created February 24, 2016 20:48
Redis Cluster Keys for all slot hashes
# 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
@rvl
rvl / git-pushing-multiple.rst
Created February 9, 2016 11:41
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

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

@mdeland
mdeland / basic_query.csv
Last active March 23, 2020 03:33
Summarizing Data in SQL
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
... ... ... ... ... ...
@Avaq
Avaq / combinators.js
Last active May 8, 2025 16:30
Common combinators in JavaScript
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))
@Informatic
Informatic / README.md
Last active March 26, 2025 00:18
Minimal Tor hidden service on OpenWRT
  1. Format your storage
  2. Configure networking (it's easiest with LuCI, or just take a look at OpenWRT howtos)
  3. Configure /storage by adding proper options in /etc/config/fstab, or, again, just clicking around in LuCI
  4. opkg update && opkg install tor
  5. Copy proper configuration, namely /etc/tor/torrc and /etc/config/uhttpd
  6. Reboot (or /etc/init.d/uhttpd restart && /etc/init.d/tor restart)
  7. Check /etc/tor/hidden_service/hostname for your public .onion address
  8. ...
  9. PROFIT!
--- 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 ---