Skip to content

Instantly share code, notes, and snippets.

Ben Holland hollandben

Block or report user

Report or block hollandben

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
View opencensus-stackdriver-exporter-log.json
{
"response": {
"config": {
"headers": {
"Accept-Encoding": "gzip",
"User-Agent": "google-api-nodejs-client/0.7.2 (gzip)",
"Authorization": "Bearer AUTHENTICATED_BEARER_TOKEN",
"Content-Type": "application/json",
"Accept": "application/json"
},
View install-filebot.sh
# TODO: release new version of FileBot for Linux
FILEBOT_PACKAGE_VERSION=4.7.21
FILEBOT_PACKAGE_SHA256=e7c99f5a0b55bf52d78f94fec3344f1951c70e0ad33aa2bc51596863fff90fc8
FILEBOT_PACKAGE=FileBot.tar.xz.gpg
FILEBOT_PACKAGE_URL=http://get.filebot.net/filebot/latest/$FILEBOT_PACKAGE
FILEBOT_PACKAGE_KEY=4E402EBF7C3C6A71
FILEBOT_PACKAGE_KEY_URL=https://raw.githubusercontent.com/filebot/plugins/master/gpg/maintainer.pub
# Download latest portable package
@hollandben
hollandben / task.js
Last active Apr 10, 2018
Mapping from one data structure to another
View task.js
function process (input) {
// Reduce over input to process an object where the key is the location and the value is the products
const tree = input
.reduce((output, o) => {
o.locations.forEach(location => {
if (output[location] === undefined) {
output[location] = [];
}
@hollandben
hollandben / .zshrc
Last active Feb 28, 2020
Configuration for ZSH with aliases
View .zshrc
# Path to your oh-my-zsh installation.
export ZSH=/Users/bholland/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="random"
# Uncomment the following line to use case-sensitive completion.
@hollandben
hollandben / publish.js
Created Mar 23, 2016
Publishing to NPM via a script
View publish.js
// http://source.entelect.co.za/automatically-publish-to-npm-using-gulp-teamcity
'use strict';
const execSync = require('child_process').execSync;
const npm = require('npm');
const fs = require('fs');
const args = require('yargs').argv;
const uri = 'http://package.brighter.io:4873';
console.log('args', args);
View angular-module-cleanup.js
import cloneDeep from 'lodash/cloneDeep';
import PayloadService from './payload.svc';
import StatsResource from '../resources/stats.rsc';
import DataTransformationService from '../../core-data-transformation/services/core-data-transformation.svc';
let $q, $timeout, statsResource, dataTransformationService;
const SUMMARY_RETRIEVAL_SERVICE_NAME = 'socialgrids.coreData.summaryRetrievalService';
class SummaryRetrievalService extends PayloadService {
@hollandben
hollandben / version.txt
Created Feb 2, 2016
GoPro Hero 3+ Black Edition
View version.txt
{
"info version":"1.1",
"firmware version":"HD3.11.03.03",
"wifi version":"4.0.36.1",
"wifi bootloader version":"0.1.0",
"wifi mac":"d4d91924fff0",
"camera type":"HERO3+ Black Edition",
"camera serial number":"H3B+B051424FFF0",
}
View pre-push-safety-net
#!/bin/bash
protected_branch='master'
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
if [ $protected_branch = $current_branch ]
then
read -p "You're about to push master, is that what you intended? [y|n] " -n 1 -r < /dev/tty
echo
if echo $REPLY | grep -E '^[Yy]$' > /dev/null
@hollandben
hollandben / gist:7badd7c9ecdf81f16602
Created Jan 22, 2015
Installing Ubuntu on Chromebook Pixel
View gist:7badd7c9ecdf81f16602
  1. Install the Crouton chrome extension
  2. Open a shell window and run sudo sh ~/Downloads/crouton -r trusty -t xiwi,unity,touch,extension.
  3. When setup is complete, run sudo startunity. It should say "Cannot connect to extension, retrying...". If a new window doesn't open, then click the Crouton browser extension button
  4. A new window should appear with Ubuntu installed.
View gist:66038f2e94d953f52fe4
@if $debug-mode == true{
/*------------------------------------*\
$DEBUG
\*------------------------------------*/
/**
* Enable this stylesheet to visually detect any improperly nested or
* potentially invalid markup, or any potentially inaccessible code.
*
* Red == definite error
* Yellow == double-check
You can’t perform that action at this time.