Skip to content

Instantly share code, notes, and snippets.


Andreas Brekken abrkn

View GitHub Profile
jborichevskiy /
Last active Jul 20, 2021
The daily template I use for Roam Research
  • Weekly Agenda (created on a different day, and embedded with /Block Reference)
  • [[Morning Questions]]
    • {{[[slider]]}} How many hours of sleep did I get?
    • What's one thing top of mind today?
    • What's the one thing I need to get done today to make progress?
    • Review #[[Index: Questions]] #values
  • Agenda
    • {{[[TODO]]}} Morning walk #goal-health #habit
    • {{[[TODO]]}} Check calendar for scheduled events
    • {{[[TODO]]}} Morning focus hour
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 Jul 26, 2021
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