Skip to content

Instantly share code, notes, and snippets.

View benhoIIand's full-sized avatar

Ben Holland benhoIIand

View GitHub Profile
{
"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"
},
# 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
@benhoIIand
benhoIIand / task.js
Last active April 10, 2018 16:36
Mapping from one data structure to another
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] = [];
}
@benhoIIand
benhoIIand / .zshrc
Last active October 15, 2021 08:36
Configuration for ZSH with aliases
# 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.
@benhoIIand
benhoIIand / publish.js
Created March 23, 2016 11:42
Publishing to NPM via a script
// 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);
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 {
@benhoIIand
benhoIIand / version.txt
Created February 2, 2016 20:21
GoPro Hero 3+ Black Edition
{
"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",
}
@benhoIIand
benhoIIand / pre-push-safety-net
Created November 26, 2015 19:59
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
@benhoIIand
benhoIIand / gist:7badd7c9ecdf81f16602
Created January 22, 2015 23:37
Installing Ubuntu on Chromebook Pixel
  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.
@benhoIIand
benhoIIand / gist:66038f2e94d953f52fe4
Created September 26, 2014 15:08
Inuit.css debug
@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