Skip to content

Instantly share code, notes, and snippets.

View bmatusiak's full-sized avatar
👌
Having Fun

Bradley Matusiak bmatusiak

👌
Having Fun
View GitHub Profile
@bmatusiak
bmatusiak / 1243.js
Last active May 31, 2022 04:48 — forked from draeder/1243.js
Gun Heroku one-click deploy testing
/**
* NOTE: Does not work with npm installed heroku-cli
*
* Heroku CLI REQUIRED! Uninstall with: npm uninstall heroku -g
* Install Heroku with: curl https://cli-assets.heroku.com/install.sh | sh
* Login Heroku with: heroku login
*
* after login you can run test
* like: $ mocha test/bug/1243.js
*
# First run:
apt-get install apt-cacher python-vm-builder
vi /etc/default/apt-cacher # ensure autostart is enabled
sudo service apt-cacher start
# Note that apt-cacher caused some problems for me, you can also try apt-cacher-ng, making sure to set the listen address to 127.0.0.1 (which it for some reason doesn't do if you have IPv6 in some cases)
git clone git://github.com/TheBlueMatt/bitcoin.git
git clone git://github.com/devrandom/gitian-builder.git
mkdir gitian-builder/inputs
wget 'http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.5.tar.gz' -O gitian-builder/inputs/miniupnpc-1.5.tar.gz
var crypto = require('crypto')
, key = 'salt_from_the_user_document'
, plaintext = 'password'
, cipher = crypto.createCipher('aes-256-cbc', key)
, decipher = crypto.createDecipher('aes-256-cbc', key);
cipher.update(plaintext, 'utf8', 'base64');
var encryptedPassword = cipher.final('base64')
decipher.update(encryptedPassword, 'base64', 'utf8');
// History.js It!
// v1.0.1 - 30 September, 2012
// https://gist.github.com/854622
(function(window,undefined){
// Prepare our Variables
var
History = window.History,
$ = window.jQuery,
document = window.document;