This file contains hidden or 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 ISCC upload helper | |
| // @namespace sebastian.berlin@wikimedia.se | |
| // @version 2026-02-27 | |
| // @description Add link to CommonsDB registry | |
| // @author You | |
| // @match https://commons.wikimedia.org/wiki/Special:UploadWizard* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=wikimedia.org | |
| // @grant GM.xmlHttpRequest | |
| // ==/UserScript== |
This file contains hidden or 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 python | |
| """Calculate time difference between two timestamps | |
| First argument is the "from" time and second is the "to" time. Format should | |
| be anything that works with `datetime.fromisoformat` | |
| (https://docs.python.org/3/library/datetime.html#datetime.datetime.fromisoformat). | |
| """ | |
| from datetime import datetime |
This file contains hidden or 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 | |
| # Add the following to .bashrc to make this work: | |
| # alias venv=". venv" | |
| source .venv/bin/activate && return 0 | |
| read -p "Create venv in .venv/? [y/N] " -r | |
| if [[ $REPLY =~ ^[Yy]$ ]] | |
| then |