Skip to content

Instantly share code, notes, and snippets.

@lastcanal
lastcanal / bs
Created July 4, 2016 17:18
freebsd libbitcoin-server rc.d script
#!/bin/sh
# $FreeBSD: branches/2016Q2/sysutils/bs/files/bs.in 386655 2015-05-18 02:05:03Z swills $
#
# PROVIDE: bs
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
@lastcanal
lastcanal / install-master.sh
Last active November 13, 2016 20:43
Experimental freebsd install.sh for libbitcoin-server
#!/bin/bash
###############################################################################
# Copyright (c) 2014-2015 libbitcoin developers (see COPYING).
#
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY
#
###############################################################################
# Script to build and install libbitcoin.
#
# Script options:
✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓x✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓x✓xx✓✓✓x✓xx✓✓✓✓x✓✓✓✓✓x✓x✓✓x✓✓✓✓x✓x✓✓✓✓✓✓✓✓x✓✓✓✓x✓✓✓✓xx✓✓✓x✓✓x✓✓xxx✓x✓✓✓x✓✓✓✓x✓✓x✓xxx✓x✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓x✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓xx✓✓✓✓✓x✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓x✓x✓✓✓✓✓x✓✓✓✓✓x✓✓✓✓xx✓✓✓✓✓✓✓x✓x✓x✓x✓xx✓x✓✓xx✓✓✓✓✓✓x✓✓✓x✓✓✓xx✓✓✓✓✓x✓✓✓x✓✓✓x✓x✓x✓xx✓✓x✓x✓x✓x✓x✓x✓✓x✓✓x✓xx✓✓✓xx✓✓x✓xx✓✓x✓✓xx✓x✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓xx✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓x✓x✓✓✓✓✓✓x✓x✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓✓xx✓✓x✓✓x✓✓✓✓✓xx✓x✓✓✓✓✓✓✓x✓✓x✓✓✓✓x✓✓x✓✓x✓✓✓x✓x✓x✓✓xx✓x✓✓x✓✓✓xxx✓xx✓x✓x✓✓xxx✓xx✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓xx✓✓x✓✓✓✓✓✓✓x✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓✓✓✓✓✓✓✓✓x✓✓xx✓✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓x✓x✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓
@lastcanal
lastcanal / bs
Created January 5, 2016 17:33
libbitcoin-server monit config
#!/bin/sh
### BEGIN INIT INFO
# Provides: bs
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: bs
# Description: bs
[:op_dup, :op_hash160, <<54, 149, 160, 200, 151, 21, 64, 216, 231, 97, 17, 175, 212, 235, 173, 47, 58, 12, 80, 42>>, :op_equalverify, :op_checksig]
@lastcanal
lastcanal / run-tarsnap
Last active August 31, 2024 19:43
FreeBSD Tarsnap Hourly Backup
#!/bin/sh
# Tarsnap backup script
# Written by Tim Bishop, 2009.
# Directories to backup
DIRS="/etc /usr/local/etc /home"
# Number of hourly backups to keep
HOURLY=24
@lastcanal
lastcanal / gist:c18d1bb5e3771779f377
Last active September 25, 2016 05:07
libbitcoin-server build FreeBSD
#!/bin/bash
###############################################################################
# Copyright (c) 2014-2015 libbitcoin-server developers (see COPYING).
#
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY
#
###############################################################################
# Script to build and install libbitcoin-server.
#
# Script options:
{
"hash": "00000000e8032cbecadd3d5fe63723eccd553d20f1f1aae2d7048c7859ff7e68",
"ver": 2,
"prev_block": "00000000002be9f43f8d7ca7a3900138f472d4c9f0d68160c443954d40e420d9",
"mrkl_root": "cbf6eaff4f606d903dbbe9e7bd6a249f570d0711648c577a52058f6f6a74cd6b",
"time": 1391548608,
"bits": 486604799,
"nonce": 3526578112,
"n_tx": 6,
"size": 1579,
# bitcoin.conf configuration file. Lines beginning with # are comments.
# Network-related settings:
# Run on the test network instead of the real bitcoin network.
testnet=1
# Connect via a socks4 proxy
#proxy=127.0.0.1:9050
##############################################################
#!/bin/bash
#
# Install Postgres 9.1, PostGIS and create PostGIS template on a clean Ubuntu 11.10 Oneiric Ocelot box
# http://wildfish.com
# add the ubuntu gis ppa
sudo apt-get -y install python-software-properties
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update