Skip to content

Instantly share code, notes, and snippets.

# mount overlay filesystem
sudo mount -t aufs -o br=/var/rsapi-test-photos:/media/peter/Backup/ none /tmp/railway-station-photos
# mount webdav
sudo mount -t davfs davs:// /home/peter/rsapi-test
pstorch / rsapi.sql
Created Jan 12, 2020
RSAPI DB Queries
View rsapi.sql
-- photographers by number of countries
SELECT, count(distinct countrycode) as countries FROM `photos` p join users u on = p.photographerid group by photographerid order by count(distinct countrycode) desc
pstorch / .zshrc
Created Sep 19, 2018
Git fetch pull request
View .zshrc
git_fetch_pull_request() {
git fetch origin refs/pull/$1/head:pr/$1
git checkout pr/$1
alias gpr='git_fetch_pull_request'
pstorch /
Created Jan 6, 2017
Get sqlite file from android app via adb (non root), example for cgeo app
adb -d shell "run-as cgeo.geocaching cp /data/data/cgeo.geocaching/databases/data /sdcard/cgeo.sqlite"
adb pull /sdcard/cgeo.sqlite
pstorch /
Created Jan 4, 2017
SchemaCrawler svg output
./ -c=graph -url=jdbc:sqlite:cgeo.sqlite -loglevel=CONFIG -infolevel=detailed -u=cgeo -outputformat=svg

Keybase proof

I hereby claim:

  • I am pstorch on github.
  • I am peterstorch ( on keybase.
  • I have a public key whose fingerprint is 954B A42D D4F4 E077 17D5 0400 1199 A722 4849 EA65

To claim this, I am signing this object:

pstorch /
Created Jun 27, 2016
find a text in files recursively
grep --include=\*.java -rnw . -e "pattern"
pstorch / chsh_zsh_winbind
Created Jun 20, 2016
Change login shell to zsh when ldap login via winbind is used
View chsh_zsh_winbind
echo template shell = /bin/zsh | sudo tee /etc/samba/smb.conf.local; sudo service winbind restart
pstorch / amazon-instance-packer.json
Last active Jan 27, 2017
Provision AWS Ubuntu AMI for with amazon-instance builder. If you have Problems with ec2-ami-tools: "ec2-bundle-vol command not found".
View amazon-instance-packer.json
"variables": {
"aws_access_key": "",
"aws_secret_key": ""
"builders": [{
"type": "amazon-instance",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"account_id": "<<YOUR_ACCOUNT_ID>>",