Skip to content

Instantly share code, notes, and snippets.

View mrfelton's full-sized avatar

Tom Kirkpatrick mrfelton

View GitHub Profile
$(document).ready(function(){
$(".option_item").click(function (e) {
if (e.target.tagName != 'INPUT') {
$(this).find("input").toggleCheckbox();
return false;
}
});
});
sdfsd sd
/**
* Revert specified features.
*/
function cw_core_features_revert($modules) {
module_load_include('inc', 'features', 'features.export');
features_include();
foreach ($modules as $module) {
if (($feature = feature_load($module, TRUE)) && module_exists($module)) {
$components = array();
// Forcefully revert all components of a feature.
core = 7.x
api=2
; Include SAC Platform makefile
includes[] = https://github.com/stoneacre/sac_platform/blob/7.x-3.x/sac_platform.make
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;
## 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/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().
+ */
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(
@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 {*}
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");