Skip to content

Instantly share code, notes, and snippets.

View indieisaconcept's full-sized avatar

Jonathan Barnett indieisaconcept

View GitHub Profile
@indieisaconcept
indieisaconcept / main.js
Last active October 2, 2021 14:50
Flic Hub package for controlling Sonos Home Theatre Settings
/**
* MIT License
*
* Copyright (c) 2021 Jonathan Barnett
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@indieisaconcept
indieisaconcept / setup_subwoofer.sh
Last active November 6, 2023 18:23
Script to manage adding a Symfonisk speaker as a subwoofer
#!/usr/bin/env bash
# Copyright 2021 Jonathan Barnett <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
# of the Software, and to permit persons to whom the Software is furnished to do
# so, subject to the following conditions:
@indieisaconcept
indieisaconcept / oboe-stream-request.js
Last active November 12, 2016 17:51
oboe.js & request.js
'use strict';
/* eslint-disable indent */
const concat = require('concat-stream'),
parse = JSON.parse;
/* eslint-enable indent */
/**
* @ngdoc function
* @name oboeRequest
@indieisaconcept
indieisaconcept / package.json
Created October 11, 2016 22:57
package.json for a hanging yarn installation
{
"name": "example",
"license": "MIT",
"version": "1.0.0",
"description": "package.json for a hanging installation",
"main": "index.js",
"author": "Jonathan Barnett <[email protected]>",
"devDependencies": {
"argv": "0.0.2",
"bas": "0.1.0",

This HowTo should apply to all environments, with the proviso that added steps are needed for production.

Build a Release

  • Begin at the tcog (Bamboo dashboard)[http://bamboo.news.com.au/browse/NEWSTECH-TCOG].
  • In the top left of the screen, select the branch you wish to build from the dropdown.
  • You will now see the build history. Bamboo automatically builds each branch but let's create a new build.

Build

if (tcog.experiment.isInVariant('template', 'tangram')) {
    ///... do something
}
@indieisaconcept
indieisaconcept / gist:21261cd9c7ff04be4447
Last active August 29, 2015 14:10
Mocking node.js dependies
var proxyquire = require('proxyquire').noPreserveCache(),
leche = require('leche'),
sinon = require('sinon'),
npath = require('path'),
_ = require('lodash');
/**
* @ngdoc function
* @name proxy
*
@indieisaconcept
indieisaconcept / gist:936dbf33cfc844d87968
Last active February 2, 2023 19:58
browserify + watchify + viny-transform + multiple bundles
// this setup assumes you are using gulp-config for file.src & file.dest
// but can be adapted to vanilla easily.
'use strict';
var transform = require('vinyl-transform'),
browserify = require('browserify'),
watchify = require('watchify'),
// consider using gulp-load-plugins
@indieisaconcept
indieisaconcept / SassMeister-input-HTML.html
Created December 12, 2013 11:45
Generated by SassMeister.com.
<div class="box box-one"></div>
<div class="box box-two"></div>
<div class="box box-three"></div>
<div class="box box-four"></div>
<div class="box box-five"></div>
@indieisaconcept
indieisaconcept / SassMeister-input-HTML.html
Created December 12, 2013 00:42
Sass maps to the rescue
<div class="news">
<div class="module-header">news</div>
</div>
<div class="sport">
<div class="module-header">sport</div>
</div>
<div class="business">
<div class="module-header">business</div>