Skip to content

Instantly share code, notes, and snippets.

View shtrom's full-sized avatar
💭
When you're coding, noone needs to see your mouth.

Olivier Mehani shtrom

💭
When you're coding, noone needs to see your mouth.
View GitHub Profile
#!/usr/bin/env python
import base64
import hashlib
import json
import logging
import random
import requests
import string
import uuid
@shtrom
shtrom / post_to_wallabag.sh
Last active February 22, 2025 05:48
Bash script to post a local HTML file to a Wallabag instance https://blog.narf.ssji.net/2025/01/17/manually-sending-document-contents-to-wallabag/
#!/bin/bash -u
# Bash script to post a local HTML file to a Wallabag instance
#
# This assumes client and user credentials are in a pass(1) entry formatted as
# follows:
#
# <PASSWORD>
# login: <USERNAME>
# client_id: <CLIENT_ID>
# client_secret: <CLIENT_SECRET>
@shtrom
shtrom / GitHub BMO Linker.js
Last active March 11, 2025 00:47
Github BMO Linker GreaseMonkey script
// ==UserScript==
// @name GitHub BMO Linker
// @version 2
// @author Olivier Mehani <[email protected]>
// @downloadURL https://gist.github.com/shtrom/e9c25e103aaf2f8ede6f740787b50e33
// @grant none
// @match https://github.com/*
// @run-at document-idle
// ==/UserScript==
@shtrom
shtrom / gpg-use-primary.sh
Created April 26, 2025 06:24
Utility script to create a temporary environment with a primary GPG key, complete with reminders about how to do maintenance tasks
#!/bin/bash -eux
if [ ${#} -lt 1 ]; then
echo "usage: ${0} <KEY_FILE>" >&2
exit 1
fi
KEY="${1}"
GPG=gpg