Skip to content

Instantly share code, notes, and snippets.

@aerth
aerth / cryptopal.go
Created May 17, 2017 19:11
cryptopal
package cryptopal
import (
"encoding/base64"
"encoding/hex"
"testing"
)
var input = "49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d"
@aerth
aerth / gpg
Last active May 21, 2017 01:54
curl https://keybase.io/aerth/key.asc | gpg --import
echo "hello world" >> yourmessage.txt
cat yourmessage.txt | gpg -er [email protected] > yourmessage.txt.out
# see this
gpg: 3C66B4C6: There is no assurance this key belongs to the named user
pub 4096R/3C66B4C6 2016-05-02 aerth <[email protected]>
Primary key fingerprint: 8295 3CFA 6F4F 49D0 2B6A 082F EBC4 61F6 8638 5D5C
Subkey fingerprint: C08F EA77 F70C 5B37 2D8C 12EF F76A 0E59 3C66 B4C6

snorql - the underwater NoSQL that bubbles

@aerth
aerth / run.gdbscript
Created November 26, 2017 21:31 — forked from laanwj/run.gdbscript
Start bitcoind in a screen in a debugger
set disable-randomization off
set $_exitcode = -999
set height 0
handle SIGTERM nostop print pass
handle SIGPIPE nostop
define hook-stop
if $_exitcode != -999
quit
else
shell echo | mail -s "NOTICE: app has stopped on unhandled signal" root
@aerth
aerth / donate
Last active February 28, 2021 08:23
aerth donate address
AQUA: 0x81C6F3459CF418D4B92aDfEE41D5b2AB545316fa
ETH: 0x81C6F3459CF418D4B92aDfEE41D5b2AB545316fa
BTC: bc1qyushnctq89wh90yrmnw8h4tqh6mpf9l38qr0mq
XMR: 4AQMNXhM2FG1aSNetWFcBhLRBt15HHxV2ByQseoHMgBJXZcwj5jE5MDXjyYd8KE6aH9v3eQK2mG1AUyTFgvRTbWg4UEB2NP
LTC: MQv3dHtgagM9wYBE7mSXDTw5AGTMmuSsCa
var printf = fmt.Printf
var fprintf = fmt.Fprintf
var newerr = fmt.Errorf
@aerth
aerth / scp_age.md
Created May 14, 2020 21:23
Asymmetric Backups over SSH using 'age' encryption (https://github.com/FiloSottile/age)

You should edit all variables and filenames :)

==> backup_homes.bash <==

set -e
RECIPIENT_KEY=github://aerth
FILENAME="/tmp/backup_$(date +%s).dat"
DIR_TO_BACKUP=/home/

# pipe tar into age and then echo the filename when finished
@aerth
aerth / sbbuild
Created May 26, 2020 18:47
SlackBuild builder (saves to /root/sbos/ and prints the amount of time it took to build)
#!/bin/bash
if [ ! "$USER" = "root" ]; then
echo must run as root
exit 111
fi
if [ ! -f *.info ]; then
echo '*.info not found'
exit 112
@aerth
aerth / aerth.asc
Last active February 18, 2025 07:07
( . )
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEZ5c/ExYJKwYBBAHaRw8BAQdApMUnGOV7cLLrNgHzcFjLTc6LAttPbHucD1rJ
kyEDbRu0GGFlcnRoIDxhZXJ0aEByaXNldXAubmV0PoiQBBMWCAA4FiEEnX8CtMQY
S5hpji8e0KUhqbevpdIFAmeXRqICGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AA
CgkQ0KUhqbevpdL5AgD+MbycLgwTCKvIZV2RBicx8Hmtt5HuuUNRv0T/rq+6eHgB
AL04NhINKvC86Fq0vEYWWJq8RsgPHUQkGJpadewP/pcFtBdhZXJ0aCA8YWVydGhA
bG9jYWxob3N0PoiQBBMWCAA4FiEEnX8CtMQYS5hpji8e0KUhqbevpdIFAmeXPxMC
GwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQ0KUhqbevpdKPAAD8DcXFr0KN
uyf+DCklAQw0HLfJGagDpJzQOyxka+HYQvsBANih2NurDbwXDMBbAjqcd0461Sp6