This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
# Show all relevant tags from file | |
exiftool -args -a -u -e -f -G1:2 test.jpg | grep -v "\-File" | grep -v "\-System" | |
# Remove all except some white listed useful tags | |
exiftool -all= -tagsFromFile @ -XMP-dc:Rights -XMP-dc:Creator -XMP-dc:Publisher -ExifIFD:ExposureTime -ExifIFD:FNumber -ExifIFD:ISO -ExifIFD:ExifVersion -ExifIFD:Flash -ExifIFD:FocalLength -ExifIFD:ColorSpace -ExifIFD:FocalLengthIn35mmFormat -IFD0:Artist -IFD0:Copyright -IFD0:Make -IFD0:Model -v0 -progress -overwrite_original |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/zsh | |
baseurl="http://example.com/blog/" | |
cd "/home/user/public_html/blog/" | |
j=0 | |
for i in `ls | sort -r` | |
do ; | |
j=`expr $j + 1` | |
if [ $j -gt 15 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Add the script to your crontab, e.g. | |
## */20 6-22 * * 1-5 $HOME/bin/slack-status/slack.sh >> $HOME/bin/slack-status/cron.log 2>&1 | |
set -o nounset | |
set -o errexit | |
set -o pipefail | |
STATUS_VAILD_FOR=1260 # 20min cron + 1min puffer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash -ex | |
myFingerprint=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
# send key to sks-keyservers.net | |
gpg --keyserver hkp://hkps.pool.sks-keyservers.net --send-keys $myFingerprint | |
# send key to keys.openpgp.org | |
gpg --export-options export-minimal --export $myFingerprint | curl -T - https://keys.openpgp.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import dbus | |
bus = dbus.SessionBus() | |
proxy = bus.get_object('org.gnome.Mutter.DisplayConfig', | |
'/org/gnome/Mutter/DisplayConfig') | |
iface = dbus.Interface(proxy, dbus_interface='org.gnome.Mutter.DisplayConfig') | |
resources = iface.GetResources() | |
serial = resources[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a boot image form active slot | |
bootctl is-slot-bootable 0 \ | |
&& bootctl is-slot-bootable 1 \ | |
&& bootctl is-slot-marked-successful 1 \ | |
&& bootctl is-slot-marked-successful 0 \ | |
&& dd if=/dev/block/by-name/boot$(bootctl get-suffix $(bootctl get-current-slot)) of=/sdcard/boot.img | |
# Write boot image to active slot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -o nounset | |
set -o errexit | |
set -o pipefail | |
if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi | |
if [[ "${1-}" =~ ^-+h(elp)?$ ]]; then | |
cat << USAGE | |
Usage: ./$(basename "$0") | |
Backup this pc to a borg repository (https://www.borgbackup.org/). Handles pruning and desktop notifications. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Terminator | |
// @description Automates finding appointments in Berlin Buergeraemter | |
// @namespace https://service.berlin.de/terminvereinbarung/termin | |
// @match https://service.berlin.de/terminvereinbarung/termin/* | |
// @version 5 | |
// @grant none | |
// ==/UserScript== | |
'use strict' |