13/7/2019
4/4/2021 (edited fixing formula and adding two graphs)
7/5/2021 (added appendix 1)
To read the context see the main document Design for improving joinmarket's resistance to sybil attacks using fidelity bonds.
13/7/2019
4/4/2021 (edited fixing formula and adding two graphs)
7/5/2021 (added appendix 1)
To read the context see the main document Design for improving joinmarket's resistance to sybil attacks using fidelity bonds.
#! /usr/bin/env bash | |
PCT_INIT=100 | |
PCT_MIN=25 | |
PCT_DROP=25 | |
MIN_AMOUNT=10000 # don't rebalance below this amount (def: 10k) | |
MIN_LOCAL=1000000 # min outbound sats per chan (def: 1M) | |
MIN_REMOTE=1000000 # min inbound sats per chan (def: 1M) | |
FEE_FACTOR=0.95 # (def: 1.0) |
#! /usr/bin/env -S bash -ex | |
if [ -z "${1}" ]; then | |
echo -en "\nPlease provide number of Gs (as integer or float)!\n\n" && exit 1 | |
fi | |
disk_size=$(bc -l <<< "2048*1024*${1}") | |
diskutil erasevolume HFS+ "ram" $(hdiutil attach -nomount ram://${disk_size}) |
#! /usr/bin/env sh | |
echo "$(cd "$(dirname "$1")"; pwd -P)/$(basename "$1")" |
#!/usr/bin/env python2 | |
import Quartz | |
#wl = Quartz.CGWindowListCopyWindowInfo( Quartz.kCGWindowListOptionOnScreenOnly | Quartz.kCGWindowListExcludeDesktopElements, Quartz.kCGNullWindowID) | |
wl = Quartz.CGWindowListCopyWindowInfo( Quartz.kCGWindowListOptionAll, Quartz.kCGNullWindowID) | |
wl = sorted(wl, key=lambda k: k.valueForKey_('kCGWindowOwnerPID')) | |
#print wl |
#! /usr/bin/env -S bash -ex | |
ps -A | grep diskimages-helper | awk '{print $1}' | xargs kill -9 |
#! /usr/bin/env bash | |
for n in {1..1000}; do | |
dd if=/dev/urandom of="file-${1}-$( printf %03d "$n" ).bin" bs=1 count="$(( RANDOM + 1024 ))" | |
done |
Moved here: https://github.com/xanoni/RaspberryPi-4B-LUKS-Scripts/blob/main/scripts/chroot-on-off.sh |
#! /usr/bin/env -S bash -x | |
echo "Starting ..." | |
rm -rf ~/Library/Caches/Apple\ -\ Safari\ -\ Safari\ Extensions\ Gallery | |
rm -rf ~/Library/Caches/Metadata/Safari | |
rm -rf ~/Library/Caches/com.apple.Safari | |
rm -rf ~/Library/Caches/com.apple.WebKit.PluginProcess | |
rm -rf ~/Library/Cookies/Cookies.binarycookies | |
rm -rf ~/Library/Preferences/Apple\ -\ Safari\ -\ Safari\ Extensions\ Gallery |
#! /usr/bin/env bash | |
servers="srv1 srv12srv3 srv4 srv5 srv6" | |
script_dir="$HOME/.configs-shared" | |
username="xyz" | |
for server in ${servers}; do | |
echo -en "\n--------------------\nServer: ${server}\n--------------------\n" | |
set -v | |
scp -r "${script_dir}"/* "${username}@${server}:/usr/local/etc/shared/" |