Skip to content

Instantly share code, notes, and snippets.

git filter-branch --prune-empty -d /dev/shm/scratch \
--index-filter "git rm --cached -f --ignore-unmatch oops.iso" \
--tag-name-filter cat -- --all
@chijikpijik
chijikpijik / emulator-install-using-avdmanager.md
Created August 9, 2021 20:49 — forked from mrk-han/emulator-install-using-avdmanager.md
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For generic skin emulator with default apis (without google apis):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-29;default;x86"

@chijikpijik
chijikpijik / gitcheats.txt
Created April 14, 2021 16:54 — forked from chrismccoy/gitcheats.txt
git cheats
# 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
@chijikpijik
chijikpijik / gist:36fdeec7690de857a6c898673c013bf2
Created October 8, 2020 14:15
delete pods by name pattern
qubectl get pods --no-headers=true | awk '/openstf/{print $1}' | xargs qubectl delete pod -- delete pods by pattern
@chijikpijik
chijikpijik / gist:6ed7b2d79dde7816feca091fbeb0396c
Last active October 5, 2020 13:13
Render locally helm template
helm template ./rethinkdb --name-template qiwi --output-dir compiled_qiwi
@chijikpijik
chijikpijik / gist:51c1ba2e245bbe2d8223270fb6062229
Created July 30, 2020 12:28
Parse list of activities and deeplinks from AndroidManifest.xml
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;}'
@chijikpijik
chijikpijik / introrx.md
Last active August 29, 2015 14:07 — forked from staltz/introrx.md

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.