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
<body> | |
<canvas id="canvas" width="1400" height="600"></canvas> | |
</body> |
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
rmdir '/opt/exagear/lic' | |
rm '/opt/exagear/bin/actool' | |
# non legacy versions | |
printf '\x00\xf0\x20\xe3\x01\x00\xa0\xe3' | dd of='/opt/exagear/bin/ubt_x32a32_al_mem2g' bs=1 seek=866740 count=8 conv=notrunc 2> /dev/null | |
printf '\x00\xf0\x20\xe3\x01\x00\xa0\xe3' | dd of='/opt/exagear/bin/ubt_x32a32_al_mem3g' bs=1 seek=996256 count=8 conv=notrunc 2> /dev/null | |
# legacy version (pi0 armv6) | |
printf '\x01\x00\xa0\xe3\x01\x00\xa0\xe3' | dd of='/opt/exagear/bin/ubt_x32a32_al' bs=1 seek=1071816 count=8 conv=notrunc 2> /dev/null |
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
# Submit a "GET" request via POST so we can send | |
# more data than fits in a URL | |
resp = requests.post( | |
url, | |
headers = {'X-HTTP-Method-Override': 'GET'}, | |
data=params) |
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
""" | |
MIT License | |
Copyright (c) 2023 David Buchanan | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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 | |
merge_commit() { | |
git show --no-patch --format='%P' "$@" | head -1 | grep -q ' ' | |
} | |
commit_meta() { | |
git show --no-patch --format="* %cd %aN <%ae> - %H" --date=local "$@" | \ | |
head -1 | \ | |
sed -E 's/^(\* [a-z0-9 ]{9,10}) \d{2}:\d{2}:\d{2}/\1/i' |
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 | |
############################################################################## | |
# Wrapper for non-interactive signing of RPMs. | |
# | |
# _NOTE: This uses environment variables for sensitive information (the GPG | |
# passphrase), so should not be used on an untrusted or shared host._ | |
# | |
# Prep | |
# ---- |
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/sh | |
if [ "$KSH_VERSION" = 'Version JM 93t+ 2010-03-05' ]; then | |
# The version of ksh93 that ships with many illumos systems does not | |
# support the "local" extension. Print a message rather than fail in | |
# subtle ways later on: | |
echo 'archcheck does not work with this ksh93 version; please try bash!' >&2 | |
exit 1 | |
fi |
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 | |
import json | |
FIREWALLD_BUS = "org.fedoraproject.FirewallD1" | |
FIREWALLD_RUNTIME_OBJ = "/org/fedoraproject/FirewallD1" | |
FIREWALLD_CONFIG_OBJ = "/org/fedoraproject/FirewallD1/config" |
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
warhammer_quote() { | |
local whquotes | |
whquotes=( | |
"A coward's only reward is to live in fear another day" | |
"A dagger in the dark is worth a thousand swords at dawn" | |
"A pity it is that we can die but once in the Emperor's service" | |
"A small mind is a tidy mind" | |
"A suspicious mind is a healthy mind" | |
"A swift execution is worth a hundred interrogations" | |
"Abhor the mutant" |
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 | |
# derived from https://stackoverflow.com/a/67161907/277767 | |
# Changes to the StackOverflow version: | |
# * delete temporary files that contain vaults! | |
# * prompt for passwords instead of passing them as program argument | |
# * more precise vault replacement | |
# * a bit nicer error messages that points at the line where re-keying failed | |
# * decryption if no password is provided |