Skip to content

Instantly share code, notes, and snippets.

View neurocis's full-sized avatar
🎯
Building the new PIGGY wallet.

Leigh Phillips neurocis

🎯
Building the new PIGGY wallet.
View GitHub Profile
@neurocis
neurocis / btrfs-listcorruptfiles.sh
Last active December 17, 2022 08:23 — forked from hdevalence/corruptfile.sh
Btrfs corrupt file locator
#!/usr/bin/bash
echo "Looking for failed csum inodes...."
inodes=`dmesg | grep 'csum failed' | grep ino | sed 's/^.*ino \([0-9]*\) .*$/\1/g' | sort -u`
for f in $inodes; do echo -e " $f"; done
echo ""
echo "Finding files from inodes..."
corruptfiles=`for i in $inodes; do find /mnt/cache -inum $i 2>/dev/null; done`
for f in $corruptfiles; do echo -e " $f"; done
@neurocis
neurocis / 1_AllInOne-TailScale.md
Last active March 14, 2024 06:27 — forked from lg/adding-tailscale-to-edgerouter.md
Add tailscale to an EdgeRouter and surviving system upgrade

Singular script

Which combines Install, setup & initialization and persists after reboot when stored as /config/scripts/post-config.d/tailscale.sh. Run sudo sh /config/scripts/post-config.d/tailscale.sh and follow the web link to initialize once script created.

#!/bin/sh
# /config/scripts/post-config.d/tailscale.sh

# check latest version against what's installed
# /boot/config/go
# add the following...
# Tailscale
bash /boot/config/tailscale/install.sh
bash /boot/config/tailscale/start.sh
@neurocis
neurocis / bitcoin_spv_wallet_overview.md
Created October 3, 2016 17:45 — forked from TOMOAKI12345/bitcoin_spv_wallet_overview.md
Bitcoin SPV Wallet Flow Overview

@neurocis
neurocis / newpiggycoin-qt_build_ubuntu.sh
Last active August 29, 2015 14:27
Shell script to build newpiggycoin-qt on ubuntu 15.x w/static BDB 5.1.29 (ubuntu 15 is BDB 5.3)
git clone https://github.com/piggycoin/newpiggycoin.git
cd newpiggycoin
BITCOIN_ROOT=$(pwd)
# Pick some path to install BDB to, here we create a directory within the dogecoin directory
BDB_PREFIX="${BITCOIN_ROOT}/db5"
mkdir -p $BDB_PREFIX
# Fetch the source and verify that it is not tampered with

Keybase proof

I hereby claim:

  • I am neurocis on github.
  • I am neurocis (https://keybase.io/neurocis) on keybase.
  • I have a public key whose fingerprint is 24B3 6081 1058 E9C8 ECED 3185 2AFF DC5F 88EF E85F

To claim this, I am signing this object:

@neurocis
neurocis / piggycoind_init.d
Created March 8, 2015 04:56
PiggyCoin Daemon init script.
#! /bin/sh
### BEGIN INIT INFO
# Provides: newpiggycoind
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: newpiggycoind daemon startup script
# Description: newpiggycoind daemon startup script
### END INIT INFO
#! /bin/bash
#######################################################################
# this is a helper script that keeps SnapRAID parity info in sync with
# your data. Here's how it works:
# 1) it first calls diff to figure out if the parity info is out of sync
# 2) if there are changed files (i.e. new, changed, moved or removed),
# it then checks how many files were removed.
# 3) if the deleted files exceed X (configurable), it triggers an
# alert email and stops. (in case of accidental deletions)
# 4) otherwise, it will call sync.
@neurocis
neurocis / app_as_screened_init.sh
Created December 4, 2014 03:25
init base script for *nix distributions to start, stop restart a daemon-ized app in a named screen running under a specific user / account.
#! /bin/sh
### BEGIN INIT INFO
# Provides: {service name here}
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: {Short Desc}
# Description: {Long Desc}
### END INIT INFO
@neurocis
neurocis / nodejs_app_forever_init.sh
Last active August 29, 2015 14:10
init base script for *nix distributions to start, stop restart a daemon-ized nodejs app in forever running under a specific user / account.
#!/bin/bash
#
# An init.d script for running a Node.js process as a service using Forever as
# the process monitor. For more configuration options associated with Forever,
# see: https://github.com/nodejitsu/forever
#
# This was written for Debian distributions such as Ubuntu, but should still
# work on RedHat, Fedora, or other RPM-based distributions, since none of the
# built-in service functions are used. So information is provided for both.
#