Skip to content

Instantly share code, notes, and snippets.

View levabd's full-sized avatar
🏠
Working from home

Oleg Levitsky levabd

🏠
Working from home
View GitHub Profile
@levabd
levabd / gist:fc88b8c92bcf7da65b5f1b45264bbc35
Created May 21, 2017 09:42 — forked from abrkn/gist:4159897
bitcoin transaction tracking
var config = require('../config')
, bitcoin = new (require('bitcoin').Client)(config('BTC'))
, async = require('async')
, db = require('./db')
, num = require('num')
, lastHeight
, clientHeight
, blockHash
, minConf = 3
, txConcurrency = 2
@levabd
levabd / db_backup.sh
Created July 5, 2016 15:43 — forked from bendavis78/db_backup.sh
A simple database backup / rotation / prune script
#!/bin/bash
# for use with cron, eg:
# 0 3 * * * postgres /var/db/db_backup.sh foo_db
if [[ -z "$1" ]]; then
echo "Usage: $0 <db_name> [pg_dump args]"
exit 1
fi