Skip to content

Instantly share code, notes, and snippets.

View gitcheats.txt
# shortform git commands
alias g='git'
# show contents of all git objects in a git repo
find .git/objects/ -type f \| sed 's/\.git\/objects\/\///' | sed 's/\///g' | xargs -n1 -I% echo echo "%" \$\(git cat-file -p "%"\) \0 | xargs -n1 -0 sh -c
# push all branches to all remotes
git remote | xargs -L1 git push --all
# count lines of .js code in a repo
View gist:36fdeec7690de857a6c898673c013bf2
qubectl get pods --no-headers=true | awk '/openstf/{print $1}' | xargs qubectl delete pod -- delete pods by pattern
View gist:6ed7b2d79dde7816feca091fbeb0396c
helm template ./rethinkdb --name-template qiwi --output-dir compiled_qiwi
chijikpijik / gist:51c1ba2e245bbe2d8223270fb6062229
Created Jul 30, 2020
Parse list of activities and deeplinks from AndroidManifest.xml
View gist:51c1ba2e245bbe2d8223270fb6062229
cat AndroidManifest.xml | sed -e ':a' -e 'N' -e '$!ba' -e 's/\.*<activity\n/\<activity/g' | awk '/\<activity.*/ {activity_line=$0;print activity_line"\n"} /.*scheme.*/ {print $1;} /.*host.*/ {print $1} /.*pathPrefix.*/ {print $1}' | sed $'s/\/\>/\\\n/g' | sed 's/.*\<activity.*android\:\(.*\)/\1/g' | awk '{RS="";FS="\n"}/.*name.*/{an=$0;next;} /.*/{print an"\n"$0}' | awk '/.*name.*/{if (x)print x;x="";}{x=(!x)?$0:x" "$0;}END{print x;}'

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.