Skip to content

Instantly share code, notes, and snippets.

View thehig's full-sized avatar

David Higgins thehig

  • Dublin, Ireland
View GitHub Profile
@thehig
thehig / raspi-config.sh
Last active August 29, 2015 14:27
kali: raspi-config
wget http://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20150706_all.deb
wget http://http.us.debian.org/debian/pool/main/l/lua5.1/lua5.1_5.1.5-8_armel.deb
wget http://http.us.debian.org/debian/pool/main/t/triggerhappy/triggerhappy_0.3.4-2_armel.deb
dpkg -i triggerhappy_0.3.4-2_armel.deb
dpkg -i lua5.1_5.1.5-4_armel.deb
dpkg -i raspi-config_20130525_all.deb
@thehig
thehig / windowskeyfinder.vbs
Created August 11, 2015 14:39
vb: Windows Key Finder
Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14
@thehig
thehig / sinon-chai-IE-test.html
Last active August 29, 2015 14:22
sinon-chai in browser error
<html>
<head>
<meta charset="utf-8">
<title>Mocha Tests</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mocha/2.2.5/mocha.css" />
</head>
<body>
<div id="mocha"></div>
<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
@thehig
thehig / gist:baf1a02ad4a460322bf5
Created June 1, 2015 18:12
Minimal working describe
var chai = require('chai');
var mocha = require('mocha');
var sinon = require("sinon");
var sinonchai = require('sinon-chai');
chai.use(sinonchai);
var expect = chai.expect;
function sinonTest(parameter, callback) {
callback(parameter);
@thehig
thehig / gist:d0a46192fb0f27496b3b
Created March 4, 2015 22:36
javascript: Promise Chaining WIP
// For an introduction to the Page Control template, see the following documentation:
// http://go.microsoft.com/fwlink/?LinkId=232511
(function () {
"use strict";
WinJS.UI.Pages.define("/pages/browse/byHub/byHub.html", {
ready: function (element, options) {
// TODO: Initialize the page here.
@thehig
thehig / mtg-mardont
Last active August 29, 2015 14:15
MTG: Decklist - Mardon't
4x Battlefield Forge
4x Bloodsoaked Champion
4x Bloodstained Mire
2x Brutal Hordechief
4x Butcher of the Horde
4x Caves of Koilos
3x Crackling Doom
4x Lightning Strike
2x Magma Jet
2x Thoughtseize