Skip to content

Instantly share code, notes, and snippets.

View matt-oakes's full-sized avatar

Matt Oakes matt-oakes

View GitHub Profile
@matt-oakes
matt-oakes / compare.js
Created August 2, 2017 14:32
Native Directory Score Comparison
const fs = require('fs');
const oldScores = require('./oldScores.json');
const newScores = require('./newScores.json');
const combinedScores = oldScores.map(library => {
const newLibrary = newScores.find(newLibrary => newLibrary.githubUrl === library.githubUrl);
return {
githubUrl: library.githubUrl,
oldScore: library.score,
system = require 'system'
webpage = require 'webpage'
fs = require 'fs'
USAGE = """
Usage: phantomjs mocha-phantomjs.coffee URL REPORTER [CONFIG]
"""
class Reporter
root@shoto:~# docker logs 71f41eb348f7
Node.js app detected
-----> Resolving engine versions
Using Node.js version: 0.10.21
Using npm version: 1.3.11
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm
npm http GET https://registry.npmjs.org/less
npm http GET https://registry.npmjs.org/mongoose
@matt-oakes
matt-oakes / 0_reuse_code.js
Created December 12, 2013 10:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f objs/Makefile install
test -d '/usr/local/Cellar/nginx/1.4.3' || mkdir -p '/usr/local/Cellar/nginx/1.4.3'
test -d '/usr/local/Cellar/nginx/1.4.3/bin' || mkdir -p '/usr/local/Cellar/nginx/1.4.3/bin'
test ! -f '/usr/local/Cellar/nginx/1.4.3/bin/nginx' || mv '/usr/local/Cellar/nginx/1.4.3/bin/nginx' '/usr/local/Cellar/nginx/1.4.3/bin/nginx.old'
cp objs/nginx '/usr/local/Cellar/nginx/1.4.3/bin/nginx'
test -d '/usr/local/etc/nginx' || mkdir -p '/usr/local/etc/nginx'
cp conf/koi-win '/usr/local/etc/nginx'
cp conf/koi-utf '/usr/local/etc/nginx'
cp conf/win-utf '/usr/local/etc/nginx'
test -f '/usr/local/etc/nginx/mime.types' || cp conf/mime.types '/usr/local/etc/nginx'
module Jekyll
class LessConverter < Converter
safe true
priority :high
def setup
return if @setup
require 'less'
@setup = true
rescue LoadError
Thread thread = new Thread() {
@Override
public void run() {
log("\tNew thread for " + start + " to " + mid + " created");
mergesort(array, start, mid, numThreadsLeft / 2);
}
};
@matt-oakes
matt-oakes / gist:3359221
Created August 15, 2012 11:14
Something
omniture.linkTrackVars = "pageName,products,prop1,eVar1,events,prop2,eVar2";
@matt-oakes
matt-oakes / Data.java
Created May 17, 2011 09:39
Secure HTTP Example
package com.matto1990.policeuk.data;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Iterator;
import org.apache.http.HttpStatus;