Skip to content

Instantly share code, notes, and snippets.

@spireblockchain
spireblockchain / rosen-watcher-prometheus.sh
Last active January 1, 2024 23:08
Rosen Bridge Watcher - Prometheus Metrics Bash Script
#!/bin/bash
#============================================================================================
# Must have prometheus-node-exporter installed
# This script will add metrics to the host Prometheus endpoint by creating a file in /var/lib/prometheus/node-exporter
# Run this script periodically via cron, i.e. every 5 minutes
# Set watcher URL
watcherUrl='http://127.0.0.1:3030'
#!/bin/bash
# For mainnet
NET=mainnet
D_PATH="0H/0H"
umask 077
#cardano-address recovery-phrase generate --size 12 > byron-phrase.prv
echo "my 12 words recovery phrase" > byron-phrase.prv
@shroomist
shroomist / rpi-cardano-build
Created December 30, 2020 10:44
rpi-cardano-build
wget https://oleg.fi/cabal-install-3.4.0.0-rc3/cabal-install-3.4.0.0-aarch64-ubuntu-18.04.tar.xz
wget https://downloads.haskell.org/ghc/8.10.2/ghc-8.10.2-aarch64-deb10-linux.tar.xz
tar -xf cabal-install-3.4.0.0-aarch64-ubuntu-18.04.tar.xz
mkdir -p ~/.local/bin
mv cabal ~/.local/bin/
export PATH="$HOME/.local/bin:$PATH"
sudo apt-get install libnuma
@SmaugPool
SmaugPool / cardano-cli-completion.md
Last active November 29, 2023 11:57
cardano-cli Bash auto-completion

To enable cardano-cli and cardano-node bash auto-completion for the current shell:

source <(cardano-cli --bash-completion-script cardano-cli)
source <(cardano-cli --bash-completion-script cardano-node)

To enable it for all future sessions:

@leosaa
leosaa / chronycfreebsd.md
Last active October 11, 2024 14:26
Chronyc in FreeBSD

Install chrony in FreeBSD

chrony is a versatile implementation of the Network Time Protocol (NTP). It can synchronise the system clock with NTP servers. Chrony is an accurate network time daemon and an alternate implementation of the Network Time Protocol (NTP) compared to ntp.org's NTPd.

Chrony has quite a few advantages over the other NTP implementations, check the chrony ntp comparison page for more details.

Installing

FreeBSD 12 supports Chrony v3.5 which allows privilege separation. The installer will create the user chronyd. So the Chrony daemon will running as the the unprivileged user chronyd

@Iman
Iman / clean.sh
Last active May 7, 2025 10:50
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/bin/sh
#Check the Drive Space Used by Cached Files
du -sh /var/cache/apt/archives
#Clean all the log file
#for logs in `find /var/log -type f`; do > $logs; done
logs=`find /var/log -type f`
for i in $logs
@ground-creative
ground-creative / rsync-usb.sh
Created April 1, 2012 14:05
RSYNC AUOBACKUP TO USB DEVICE
#!/bin/bash
####### RSYNC AUOBACKUP TO USB DEVICE V0.5 ##########
####### Developed by Carlo Pietrobattista ###########
### CONFIG VARS #####################################
LOCK_FILE="/tmp/rsync-usb.pid" # the lock file name
MOUNT_DEV="/dev/sdh1" # mount device
MOUNT_PATH="/mnt/autobackup-usb" # mount point
BACKUP_DIR="/home/*" # backup directory
RSYNC_LOG_FILE="/var/log/rsync/usb_backup.log" # rsync log file
#####################################################