Skip to content

Instantly share code, notes, and snippets.

pstorch /
Created August 27, 2023 13:38
Move .jpg files to subdirectory by date
for x in *.jpg; do
d=$(date -r "$x" +%Y-%m-%d)
mkdir -p "./$d"
mv -- "$x" "./$d/"
pstorch / access_not_found.log
Created January 7, 2023 09:27
URLs from access log which are not found
GET /.env
GET /.sts.php
GET /.svn
GET /1index.php
GET /1index.php?f=
GET /2index.php
GET /2index.php?f=
GET /3index.php
GET /3index.php?f=
GET /2018/wp-includes/wlwmanifest.xml
pstorch /
Created February 9, 2020 21:33
# 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 January 12, 2020 11:32
RSAPI DB Queries
-- 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 September 19, 2018 20:24
Git fetch pull request
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 January 6, 2017 22:32
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 January 4, 2017 14:10
SchemaCrawler svg output
./ -c=graph -url=jdbc:sqlite:cgeo.sqlite -loglevel=CONFIG -infolevel=detailed -u=cgeo -outputformat=svg
:w !sudo tee %

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 June 27, 2016 11:17
find a text in files recursively
grep --include=\*.java -rnw . -e "pattern"