Skip to content

Instantly share code, notes, and snippets.

View znvm.zsh
#!/usr/bin/env python3
Copy flickr photos to folder
-s upload to s3, not you will need to set AWS_SECRET_ACCESS_KEY
AWS_ACCESS_KEY_ID and ENDPOINT_URL environment variables if you want to do
-d directoryName The directory where the photos listed
View git-ver
if [ -z "$VERSION" ];then
echo "Version argument is mandantory" >&2
exit 1
if expr "$VERSION" : "^v[0-9]\+\.[0-9]\+\.[0-9]\+" >/dev/null;then
#!/usr/bin/env python2
# Python script to generate TOTP qrcodes from keepass database to scan into
# authenticator app
# Required libraries:
from pykeepass import PyKeePass
import qrcode
import os
ISSUER="Somewhere Org"
KEEPASS_PASSWORD="the secret password"
echo "$KEEPASS_PASSWORD" | keepassxc-cli show -a "TOTP Seed" "$PATH_TO_FILE" "$PATH_TO_ACCOUNT" | grep -v "Insert password" | while read i;do echo "otpauth://totp/$ACCOUNT_NAME?secret=$i&issuer=$ISSUER" | qr;done;
# to play a sound after pomodoro finished
# set update frequency to 0 to don't display updates
# In that case send a USR1 signal to the process if you want to see the elapsed time
# The script will update you slack status if slack token set
# You can set slack token by setting the SLACK_TOKEN env var
# Or put the token into a gpg encrypted file to $HOME/.secret/slack_token.gpg
# You can override that path by setting the SLACK_TOKEN_FILE_PATH env var
Ajnasz / pre-commit
Last active Apr 14, 2018 — forked from jhartikainen/commit-msg
ESLint git commit hook
View pre-commit
files=$(git diff --diff-filter ACMR --cached --name-only | grep '\.js$')
for file in $files; do
git show :$file | $(npm bin)/eslint --stdin --stdin-filename $file
# get clues
grep CLUE crimescene
# clue mentioned Annabel
grep Annabel people | \
cut -s -f 4 | \
cut -d ' ' -f1-2,4 | \
sed 's/ /_/' | \
Ajnasz /
Last active May 19, 2018
Download stuff from humble-bundle in batch
View commit-msg
# An example hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit. The hook is allowed to edit the commit message file.
# To enable this hook, rename this file to "commit-msg".
You can’t perform that action at this time.