Skip to content

Instantly share code, notes, and snippets.

John Noel johnnoel

View GitHub Profile
johnnoel / ginit.vim
Created Apr 21, 2018
Provisional nvim initi files
View ginit.vim
" see
GuiFont! Droid Sans Mono Dotted for Powe:h10
call GuiWindowMaximized(1)
let g:airline_powerline_fonts = 1
if !exists('g:airline_symbols')
let g:airline_symbols = {}
johnnoel / Average.js
Created Feb 18, 2017
JavaScript ES6 Classes for perceptual image hashing
View Average.js
import Colour from './Colour';
import Resample from './Resample';
* Average hash for images
* @author John Noel <>
* @see
* @see
johnnoel / output.html.twig
Created Jan 17, 2017
Twig template for Swagger API documentation
View output.html.twig
<!DOCTYPE html>
<html lang="en-GB">
<meta charset="utf-8">
<title>Swagger documentation</title>
<link rel="stylesheet" href=",400,700,900">
<link rel="stylesheet" href="style.css">
<h1>{{ info.title }}{% if info.version is defined and info.version is not empty %} <small>v{{ info.version }}</small>{% endif %}</h1>

Keybase proof

I hereby claim:

  • I am johnnoel on github.
  • I am chaostangent ( on keybase.
  • I have a public key whose fingerprint is B123 5F99 E19D EA12 5899 32CD F97E 8DCE 6396 6994

To claim this, I am signing this object:

johnnoel / archive.php
Created May 2, 2015 archiver
View archive.php
use Buzz\Browser,
require __DIR__.'/vendor/autoload.php';
$rootDir = __DIR__.'/archive';
$baseUrl = '';
$postsPerPage = 5;
johnnoel / barcoder.php
Last active Aug 29, 2015
Creates "barcode" style images from video files, kind of like
View barcoder.php
$videoFiles = array();
if ($_SERVER['argc'] <= 1) {
die('No files passed in command line');
$videoFiles = $_SERVER['argv'];
johnnoel / screenshotter.php
Created Oct 11, 2012
PHP script for controlling mplayer to automatically take screenshots
View screenshotter.php
$ssCount = 250;
$cmdMplayer = "e:\downloads\mplayer\mplayer\mplayer.exe";
$argsInfo = " -vo null -nosound -frames 0 -identify";
$argsCapture = " -quiet -nosound -vo jpeg:quality=90 -vf framestep=i{framestep} -fps 360 -lavdopts threads=4";
if($_SERVER['argc'] > 1)
johnnoel / delocal.js
Created Jan 21, 2012
PhantomJS input for rendering a page with webfonts (not yet Typekit compatible)
View delocal.js
var stylesheets = document.styleSheets;
for (i in stylesheets) {
var stylesheet = stylesheets[i];
var rules = stylesheet.cssRules;
for (j in rules) {
var rule = rules[j];
if (rule instanceof CSSFontFaceRule) {
var src ='src');
var srcSansLocal = src.replace(/local\([^\)]+?\)\s*,\s*/i, '');'src', srcSansLocal, null);
You can’t perform that action at this time.