Skip to content

Instantly share code, notes, and snippets.

View provegard's full-sized avatar
Test-driving things

Per Rovegård provegard

Test-driving things
View GitHub Profile
@provegard
provegard / dump_wallet_addresses.py
Last active March 15, 2023 06:13
Python script for dumping wallet addresses and private keys
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# This software is in the public domain, furnished "as is", without technical
# support, and with no warranty, express or implied, as to its usefulness for
# any purpose.
#
# Usage:
# ./dump_wallet_addresses.py <wallet binary>
#
@provegard
provegard / ivt490d.py
Created June 20, 2015 21:36
Collect IVT490 readings
#!/usr/bin/env python
#pylint: indent-string=' '
import serial
import daemon
import signal
import lockfile
import time
import getopt
import os
@provegard
provegard / notify-up.sh
Last active June 17, 2018 09:18
Script for sending sms on server start
#!/bin/bash
set -x
msg="$SERVER has started."
shutdown_dt=$(last -x --time-format iso |grep shutdown | head -n 1 | awk '{print $7}')
if [ -n "$shutdown_dt" ]; then
msg="$msg Shutdown at $shutdown_dt"
fi
@provegard
provegard / send-sms.sh
Created June 9, 2018 08:00
Send SMS script
#/bin/sh
dest=$1
test -n "$dest" || exit 1
read text
user=`whoami`
retries=5
cont=1
while test $retries -gt 0 -a $cont -ne 0; do
@provegard
provegard / notify-up.service
Created June 17, 2018 09:19
Systemd boot service for calling notify-up.sh
[Unit]
Description=Sends SMS to notify about system coming up
After=network.target
[Service]
ExecStart=/usr/local/bin/notify-up.sh
Type=oneshot
[Install]
WantedBy=default.target