Skip to content

Instantly share code, notes, and snippets.

Andreas Brekken abrkn

Block or report user

Report or block abrkn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View sai.md

SAI is the native token of SideShift AI. At this time, 1 SAI = $0.10 USD. This is a temporary promotion during the TEST PILOT PHASE and not a guarantee. Basically, SAI could be worth zero in the future.

Smart Contract

  • Type: ERC20
  • Network: Ethereum (mainnet)
  • Address: 0xf5b403abd806eff15b339909943e2c22ecbac54c
  • Decimals: 18
  • Symbol: SAI
  • Name: Sai
@abrkn
abrkn / move-bitcoin-unspent-to-default-account.sh
Created Nov 22, 2018
Bitcoin: Move all unspent funds to the default ("") account
View move-bitcoin-unspent-to-default-account.sh
bitcoin-cli listunspent | grep address | cut -d\" -f4 | xargs -L1 -I{} bitcoin-cli setaccount {} ""
View drivechain.ai.md

Drivechain.ai

The following toolkit makes getting started with Drivechain TestDrive easier and more fun!

Services

@abrkn
abrkn / drivechain.ai.md
Created Oct 22, 2018
Welcome to Drivechain.ai
View drivechain.ai.md

Drivechain.ai

Drivechain.ai is a toolkit created by Andreas Brekken to make getting started and using the Drivechain TestDrive easier and more fun.

Services

View postgres-index.js
#!/usr/bin/env node -r panik -r dotenv/config
const assert = require('assert');
const { URL } = require('url');
const redis = require('redis');
const bitcoin = require('bitcoin');
const safync = require('./safync');
const { urlToBitcoinOptions } = require('./utils');
const Promise = require('bluebird');
const { pMemoize } = require('./pmr');
const pgp = require('pg-promise');
@abrkn
abrkn / drivechain-install-linux.sh
Last active Oct 31, 2018
Automatic installation of Drivechain TestDrive
View drivechain-install-linux.sh
#!/usr/bin/env bash
# AutoTestDrive v7
# Automation Drivechain TestDrive installation for Ubuntu
# Uses Drivenet-9, UTXO-7, Sidechain-8, Payment-1
#
# Changelog
#
# Revision 8
# - Do not restore wallet unless revision 8
# - Fix typo in wallet restore code (payment restored sidechain wallet)
View sane-jest.js
import assert from 'assert';
import createDebug from 'debug';
const debug = createDebug(`sane-jest`);
const theirDescribe = describe;
const theirTest = test;
const defaultTimeout = +(process.env.SANE_JEST_TIMEOUT || 30e3);
View sane-jest.js
import assert from 'assert';
import createDebug from 'debug';
const debug = createDebug(`sane-jest`);
const theirDescribe = describe;
const theirTest = test;
const defaultTimeout = +(process.env.SANE_JEST_TIMEOUT || 30e3);
@abrkn
abrkn / lnd.shitcoin.com.md
Last active Jul 17, 2018
How to connect to lnd.shitcoin.com
View lnd.shitcoin.com.md

Do you run a Bitcoin Lightning Network node? Connect to lnd.shitcoin.com for the fastest and cheapest transaction routing!

How to connect

For LND users:

lncli connect 036b32ac6acf6d178f47c2139b7327ab85bd3d5f5c40681a9a48109ea21f53e1e5@lnd.shitcoin.com:9735

For c-lightning users:

@abrkn
abrkn / bitfinex-limiter.js
Created Jul 5, 2018
Bitfinex Rate Limiting
View bitfinex-limiter.js
import { RateLimiter } from 'limiter';
import createDebug from 'debug';
const debug = createDebug('koh:bitfinex:limiter');
const LOWER_MAX_REQUESTS_PER_MINUTE = 10;
const UPPER_MAX_REQUESTS_PER_MINUTE = 90;
const MIN_TOKENS_PER_MINUTE = 1;
const MAX_TOKENS_PER_MINUTE = UPPER_MAX_REQUESTS_PER_MINUTE / LOWER_MAX_REQUESTS_PER_MINUTE;
const DEFAULT_TOKENS_PER_MINUTE = (MIN_TOKENS_PER_MINUTE + MAX_TOKENS_PER_MINUTE) / 2;
You can’t perform that action at this time.