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
mrfelton /
Last active Jul 30, 2019
Shell script to unlock lnd on system startup
# Do nothing if the WALLET_PASSWORD var is not set.
if [ -z "$PASSWORD" ]; then
echo "[lnd_unlock] Please set PASSWORD in order to unlock wallet automatically."
# output script content for easier debugging.
# set -x
# exit from script if error was raised.
set -e
statico / circleci.yml
Created Jan 21, 2019
Node.js 10 + PostgreSQL CircleCI config
View circleci.yml
version: 2
version: 2
- test

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


abrkn /
Last active Oct 31, 2018
Automatic installation of Drivechain TestDrive
#!/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)
mcdougal / _error.js
Created Sep 28, 2018
Using @sentry/browser with Next.js for client and server-side rendering
View _error.js
import * as Sentry from '@sentry/browser';
import getConfig from 'next/config';
import React from 'react';
const { SENTRY_DSN } = getConfig().publicRuntimeConfig;
Sentry.init({ dsn: SENTRY_DSN });
* Send an error event to Sentry.
gavinandresen / ReplayProtection.patch
Created Jun 15, 2017
OP_RETURN replay protection patch
View ReplayProtection.patch
diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp
index ec398f662..6724399c0 100644
--- a/src/policy/policy.cpp
+++ b/src/policy/policy.cpp
@@ -117,6 +117,10 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnes
return false;
+ if (tx.ReplayProtected()) {
+ return false;
View create-reconnecting-websocket.js
* Import dependencies
const { EventEmitter } = require('events');
const ReconnectingWebSocket = require('reconnecting-websocket');
* Export a function that creates a websocket connection interface
export default function createReconnectingWebsocket(uri) {
eiriklv / avoiding-exceptions.js
Last active Feb 2, 2019
Exception free JavaScript?
View avoiding-exceptions.js
* Check out error handling in golang:
* Wrap an "unsafe" promise
function safePromise(promise) {
return promise
roadrunner2 / 0
Last active Sep 16, 2019
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)
View 0


This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se

bmhatfield / .profile
Last active Aug 27, 2019
Automatic Git commit signing with GPG on OSX
View .profile
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
You can’t perform that action at this time.