Skip to content

Instantly share code, notes, and snippets.

@bencevans
bencevans / gist:4121772
Created November 20, 2012 22:42
Release Header
/*
* {{name}} v{{version}}
* {{website}}
*
* Copyright 2012 {{author.name}} <{{author.email}}> ({{author.website}})
* Released under the {{licence.name}} license
* {{licence.url}}
*
* Date: {{date}}
*/
@bencevans
bencevans / jstable.js
Last active December 10, 2015 02:48
JS Table DOM Helper
var jstable = function(DOMTable, data, options) {
return new JSTable(DOMTable, data, options);
};
var JSTable = function() {
this.element = DOMTable;
this.data = data || [];
this.options = options || {};
if(typeof this.options.noDataMessage == 'undefined')
@bencevans
bencevans / README.md
Last active December 12, 2015 04:39
Barton Internet Guard

Barton Internet Guard (Obsolete)

The proxy has been updated to use a new login design however this tool has not been updated.

Barton Peveril's WiFi requires authentication... every 15 mins.

When working on projects that require an internet connection this can easily break them. This gist/script automates the login process and can be run from terminal/cron job.

Requirements

@bencevans
bencevans / index.html
Created February 12, 2013 19:05
Leaflet.js + Open Sreet Maps Bootstrap
<html>
<head>
<title></title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.ie.css" />
<![endif]-->
<style>
#map { height: 180px; }
</style>
@bencevans
bencevans / README.md
Created February 24, 2013 16:34
Unofficial We Are Hunted API (Used by their Spotify app)

Unofficial We Hunted API

I believe there used to be an official API however all the docs seems to of vanished so...

This API is used by the We Are Hunted Spotify App thus pretty stable. Reverse Engineered by @bencevans. Usage isn't to bring any harm to We Are Hunted, just for educational purposes obviously!

Formats

JSON

@bencevans
bencevans / dabblet.css
Created April 2, 2013 21:40
CSS3 Loading with Window (Chrome)
/**
* CSS3 Loading with Window (Chrome)
*/
body {
background-color: #111;
}
.container {
margin: 100px auto;
@bencevans
bencevans / teapot.js
Created May 5, 2013 09:08
'I'm a teapot' node.js server
var http = require('http');
var server = http.createServer(function(req, res) {
res.statusCode = 418;
res.end('I\'m a teapot');
});
server.listen(process.env.PORT || 3000);
@bencevans
bencevans / build.sh
Last active December 17, 2015 07:19
Ubuntu 13.04 Tomahawk Build
sudo apt-get update
sudo apt-get install -y python-software-properties
sudo add-apt-repository -y ppa:tomahawk
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y libechonest-dev libfftw3-dev libsamplerate0-dev libgsasl7-dev subversion build-essential cmake libtag1c2a libtag1-dev libqt5-dev libqt5-sql-sqlite \
libphonon-dev libboost-dev libboost-thread-dev zlib1g-dev libgnutls-dev libz-dev \
libqjson-dev libattica-dev libqca2-dev libx11-dev pkg-config libqca2-plugin-ossl git-core libspeex-dev # phonon-backend-vlc
cd ~
@bencevans
bencevans / server.js
Created May 16, 2013 12:24
SOCKSio net SOCKS4a Proxy Server Helper
/**
* Module Dependencies
*/
var net = require('net'),
EventEmitter = require('events').EventEmitter,
util = require('util');
/**
* SOCKS Server Wrapper for a net stream
@bencevans
bencevans / index.js
Created May 26, 2013 11:54
If Google Chrome/Chromium
/**
* Is Google Chrome/Chromium?
*/
if(window && window.chrome) {
// Load the magic
} else {
// D'oh!
}