I hereby claim:
- I am brycefisher on github.
- I am bff (https://keybase.io/bff) on keybase.
- I have a public key ASBZB5Tjeib9trqDLSZppdt5o1m8d8wAylr_Jmdkl3fMJgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
# TODO -- Debug this logic. It doesn't quite seem to give the expected results. | |
import csv | |
filename = 'pre-failover.csv' | |
HOUR = 60 | |
max_wait = 1 | |
TASKS_PER_INSTANCE = 6 |
#!/bin/bash | |
mongorestore --drop -d fulfillment_options_development $HOME/.goodeggs-data-dumps/fulfillment-options/ |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Play Time</title> | |
</head> | |
<body> | |
<form> | |
<input type="file" id="file-chooser" /> | |
<button id="upload-button">Upload to S3</button> | |
<div id="results"></div> |
// Implements the signing example w/out AWS SDK in nodejs. See: | |
// http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html | |
const crypto = require('crypto'); | |
function signingKey(secretAccessKey, region, service, datetime) { | |
var date = datetime.substr(0, 8); | |
var kDate = crypto.createHmac('sha256', 'AWS4' + secretAccessKey).update(date).digest(); | |
var kRegion = crypto.createHmac('sha256', kDate).update(region).digest(); | |
var kService = crypto.createHmac('sha256', kRegion).update(service).digest(); | |
return crypto.createHmac('sha256', kService).update('aws4_request').digest('hex'); |
<?php | |
//... | |
// Store the database credentials serialized in an environmental variable. | |
$db_creds = unserialize(getenv('DRUPAL_DB_CRED')); | |
$databases = array ( | |
'default' => | |
array ( | |
'default' => $db_creds, |
<?php | |
/** | |
* @file | |
* This is a drush script designed to create fake translations of the genera pages for development purposes ONLY. | |
* | |
* NOTE: | |
* ----- | |
* This file must be located somewhere inside the drupal root. | |
* | |
* USAGE: |
<?php | |
$nids = array(1, 2, 3, 4, 5); | |
// This is the key piece to understand -- it creates as many placeholder as you want based on the length of $nids array. | |
$placeholders = implode(',', array_fill(0, count($nids), '%d')); | |
$results = db_query(" | |
select r.title | |
from {node_revisions} r | |
join {node} n |
/** | |
* Create a nodequeue. | |
*/ | |
function _brightcove_marketing_solutions_create_nodequeue() { | |
$nodequeue = new stdClass; | |
// $nodequeue->api_version = 2; | |
$nodequeue->name = 'marketing_solutions_related_partners'; | |
$nodequeue->title = 'Marketing solutions - related partners'; | |
$nodequeue->subqueue_title = ''; | |
$nodequeue->size = 0; |
<?php | |
/** | |
* Like var_dump, but it prints out the whole expression "path" to the given string. | |
* | |
* @param mixed $haystack | |
* The object or array with many levels of nested arrays or objects containing your needle | |
* @param str $php_exp | |
* The php expression for the initial $haystack param | |
* @return str | |
* No return value. Prints output to stdout (assumed to be a browser). |