Skip to content

Instantly share code, notes, and snippets.

View domjtalbot's full-sized avatar

Dom Talbot domjtalbot

  • Inverness, Scotland
  • 19:34 (UTC)
View GitHub Profile
@domjtalbot
domjtalbot / rubygems-update.js
Last active December 2, 2016 13:20
Nodejs script to automate RubyGems update to fix SSL errors. Ruby version controlled via environment variable RUBYVERSION
import download from 'download';
import { exec } from 'child_process';
import { unlinkSync} from 'fs';
import Ora from 'ora';
import './env.es6';
import { Debug } from './debug.es6';
import { green } from 'ansicolors';
const debug = new Debug('ruby:ssl');
@domjtalbot
domjtalbot / node-install.js
Last active December 2, 2016 13:20
Automate Node version install via NVM Node version controlled via environment variable NODEVERSION
import { exec } from 'child_process';
import Ora from 'ora';
import './env.es6';
import { Debug } from './debug.es6';
import { green } from 'ansicolors';
const debug = new Debug('node:install');
const version = process.env.NODEVERSION;
const cwd = process.cwd();
@domjtalbot
domjtalbot / debug.js
Created December 2, 2016 13:09
Custom debug class - better browser support
/* global:window */
import npmdebug from 'debug';
import './env.es6';
npmdebug.enable(process.env.DEBUG);
const heNamespace = 'dom:';
export const clientDebug = npmdebug;