Skip to content

Instantly share code, notes, and snippets.

View jshbrntt's full-sized avatar
🏠
Working from home

Joshua Barnett jshbrntt

🏠
Working from home
View GitHub Profile
/* jshint node: true */
'use strict';
const path = require('path');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
let config = {};
config.context = path.join(__dirname, 'src');
@jshbrntt
jshbrntt / fixing-xubuntu.md
Last active August 30, 2016 08:26
Fixing xubuntu
@jshbrntt
jshbrntt / code-keyboard-media-keys.ahk
Last active August 6, 2016 10:42
For those who like the CODE Keyboard media keybindings and would like to emulate them on any keyboard using AutoHotKey.
AppsKey & Insert::
Send {Media_Play_Pause}
KeyWait Insert
Return
AppsKey & Delete::
Send {Media_Prev}
KeyWait Delete
Return
@jshbrntt
jshbrntt / module-convert.js
Created May 3, 2016 08:51
A script written to partially convert modular AngularJS code to module bundler compatible code.
/*jshint loopfunc: true */
(function() {
'use strict';
var beautify = require('js-beautify').js_beautify;
var fs = require('fs');
var glob = require('glob');
var path = require('path');
var mkdirp = require('mkdirp');
var process = require('process');
var regex = {
@jshbrntt
jshbrntt / gulpfile.js
Created July 13, 2015 08:44
Browserify + Watchify + Browser Sync + Bower
/* global require */
var _ = require('lodash');
var browserify = require('browserify');
var browserSync = require('browser-sync');
var buffer = require('vinyl-buffer');
var del = require('del');
var gulp = require('gulp');
var gutil = require('gulp-util');
var minify = require('gulp-minify-css');
<--------------- RAID Z ----------- --->
3 TB 4 TB 4 TB
+----------+ +----------+ +----------+
| | | | | |
| 3 TB | | 3 TB | | 3 TB |
| | | | | |
+----------+ +----------+ |..........|
| 1 TB | | 1 TB |
+----------+ +----------+
<---------MIRROR--------->
[root@freenas] ~# gpart list ada2
Geom name: ada2
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 8191999966
first: 34
entries: 128
scheme: GPT
@jshbrntt
jshbrntt / normal.js
Last active June 9, 2016 22:12
HSBC Personal Statement to CSV
var statementDate = new Date(Date.parse(document.getElementsByClassName('hsbcTextRight')[0].textContent));
var rows =
document
.getElementsByTagName('table')[1] // Second table
.getElementsByTagName('tbody')[0] // Table body
.getElementsByTagName('tr'); // Table body rows
// Convert HTMLCollection to Array.
rows = [].slice.call(rows);
// Trim top and bottom rows.
rows.shift();
@jshbrntt
jshbrntt / gist:5ba0332ff27ebf91c98a
Last active August 29, 2015 14:22
Point Class in TypeScript, ActionScript, and Java Example
// TypeScript
class Point
{
public x: number;
public y: number;
constructor(x:number = 0.0, y:number = 0.0)
{
this.x = x;
this.y = y;
RewriteEngine on
RewriteBase /
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1 # Developer IP
RewriteCond %{REQUEST_URI} !^/maintenance\.html$
RewriteRule ^(.*)$ http://myhost.co.uk/maintenance.html [R=307,L]