Skip to content

Instantly share code, notes, and snippets.

@mrfelton
mrfelton / unlock.sh
Last active July 30, 2019 07:29
Shell script to unlock lnd on system startup
#!/bin/bash
# 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."
s6-pause
fi
# output script content for easier debugging.
# set -x
# exit from script if error was raised.
set -e
@mrfelton
mrfelton / lnd.log
Created August 19, 2018 10:11
lnd sync logs (multiple hosts)
[INF] BTCN: Starting cfheaders sync at block_height=1384261, hash=000000000001e2d21cabb2927085ed4418db8fc63fa1d826cefab60c3c0fee5c
[INF] BTCN: Starting cfheaders sync for filter_type=0
[DBG] BTCN: Sending getcfcheckpt to 35.231.86.179:18333 (outbound)
[DBG] BTCN: Sending getcfcheckpt to 35.196.85.107:18333 (outbound)
[INF] LNWL: Done catching up block hashes
[INF] LNWL: Started rescan from block 000000000001e2d21cabb2927085ed4418db8fc63fa1d826cefab60c3c0fee5c (height 1384261) for 1 address
[DBG] BTCN: Received cfcheckpt from 35.196.85.107:18333 (outbound)
[DBG] BTCN: Received unhandled message of type cfcheckpt from 35.196.85.107:18333 (outbound)
[DBG] BTCN: Received cfcheckpt from 35.231.86.179:18333 (outbound)
[DBG] BTCN: Received unhandled message of type cfcheckpt from 35.231.86.179:18333 (outbound)
thedeathmachine:lnd tom$ make
Compiling dependencies.
dep ensure -v
# Gopkg.lock is out of sync with Gopkg.toml and project imports:
github.com/lightningnetwork/lnd/aezeed: imported or required, but missing from Gopkg.lock's input-imports
github.com/lightningnetwork/lnd/autopilot: imported or required, but missing from Gopkg.lock's input-imports
github.com/lightningnetwork/lnd/brontide: imported or required, but missing from Gopkg.lock's input-imports
github.com/lightningnetwork/lnd/chainntnfs: imported or required, but missing from Gopkg.lock's input-imports
github.com/lightningnetwork/lnd/chainntnfs/bitcoindnotify: imported or required, but missing from Gopkg.lock's input-imports
github.com/lightningnetwork/lnd/chainntnfs/btcdnotify: imported or required, but missing from Gopkg.lock's input-imports
process.env.GRPC_SSL_CIPHER_SUITES =
"ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384";
var grpc = require("grpc");
var fs = require("fs");
const lndCert = fs.readFileSync("/home/bitcoin/.lnd/tls.cert");
const credentials = grpc.credentials.createSsl(lndCert);
const lnrpcDescriptor = grpc.load("rpc.proto");
@mrfelton
mrfelton / resthook.js
Created June 29, 2016 21:56
Example fullcube webhook client implementation
const bodyParser = require('body-parser')
const crypto = require('crypto')
const logger = require('fullcube-logger')
module.exports = function resthookBootFn(app) {
/**
* Calculate a secret token based on the payload and the shared secret
* @param secret
* @param payload
* @returns {*}
diff --git a/lib/esConnector.js b/lib/esConnector.js
index 99318ac..3aa48db 100644
--- a/lib/esConnector.js
+++ b/lib/esConnector.js
@@ -175,19 +175,20 @@ ESConnector.prototype.setupMappings = function (modelNames, callback) {
return !modelNames || _.includes(modelNames, mapping.name);
});
log('ESConnector.prototype.setupMappings', 'mappingsToSetUp', _.pluck(mappingsToSetUp, 'name'));
-
Promise.map(
diff --git a/modules/pantheon/pantheon_apachesolr/pantheon_apachesolr.module b/modules/pantheon/pantheon_apachesolr/pantheon_apachesolr.module
index e3e732c..97bd383 100644
--- a/modules/pantheon/pantheon_apachesolr/pantheon_apachesolr.module
+++ b/modules/pantheon/pantheon_apachesolr/pantheon_apachesolr.module
@@ -72,6 +72,18 @@ function pantheon_apachesolr_help($path, $arg) {
}
/**
+ * Implemenets hook_permission().
+ */
## CONFIG ---
# Some variables to make our life easier.
# These are sourced in from a local config file so that we can keep them out of git.
# PANTHEON_SITE_NAME='X'
# PANTHEON_USERNAME='X'
# PANTHEON_PASSWORD='X'
# PANTHEON_SITE_USERNAME='X'
# PANTHEON_SITE_PASSWORD='X'
# TEST_SUITE_FILE='X'#
#
diff --git a/commerce_realex.module b/commerce_realex.module
index e1b86a0..407d143 100644
--- a/commerce_realex.module
+++ b/commerce_realex.module
@@ -156,11 +156,12 @@ function _commerce_realex_supported_card_types() {
*/
class RealexParser {
- // Initialise variables.
- var $parser;
core = 7.x
api=2
; Include SAC Platform makefile
includes[] = https://github.com/stoneacre/sac_platform/blob/7.x-3.x/sac_platform.make