Skip to content

Instantly share code, notes, and snippets.

View basicallydan's full-sized avatar
👨‍💻
Working in the office a lot these days!

Daniel Hough basicallydan

👨‍💻
Working in the office a lot these days!
View GitHub Profile
@basicallydan
basicallydan / specHelper.js
Created September 8, 2014 08:53
Handlebars for Mocha with Browserify
/*
* This is useful if you are using Mocha for your tests, Browserify for Modules and Handlebars for templates.
* It should be set up before running tests
* Note that require.extensions is depreciated: http://nodejs.org/api/globals.html#globals_require_extensions
* It is based on https://gist.github.com/akre54/11183020
*/
var Handlebars = require('handlebars');
var fs = require('fs');
@basicallydan
basicallydan / gulpfile.js
Created February 12, 2014 07:06
Gulpfile for PhoneGap App on Ripple using Browserify
var gulp = require('gulp');
var browserify = require('gulp-browserify');
var concat = require('gulp-concat');
var styl = require('gulp-styl');
var path = require('path');
var o = require('open');
var ripple = require('ripple-emulator');
var webPath = function (p) { return path.join('./www/', p); };
// Builds the scripts based on a single entry point using browserify
@basicallydan
basicallydan / all-markdown-features-v1.html
Created April 26, 2013 14:06
This is an HTML File which shows all the features one can expect a good Markdown parser which supports v1.0.1 to be able to output. The purpose of this file is to use it as something to create stylesheets against for content which started as markdown.
<h1>First-level Headers are Supported</h1>
<p>Paragraphs are supported.</p>
<p>Paragraphs are definitely supported.</p>
<h2>Second-level Headers are Supported</h2>
<ul>
<li>Unordered lists are supported</li>
<li>They are one of my favourite things to do in Markdown</li>
@basicallydan
basicallydan / sample-gist.js
Created February 19, 2013 10:14
A sample gist to embed somewhere as an example.
function showSampleGist() {
console.log('This is a sample gist');
}
setInterval(showSampleGist, 1000);
@basicallydan
basicallydan / skifree-v1.js
Created February 17, 2013 20:37
An excerpt of how the original SkiFree port that I created looked, in essence.
var skier;
var trees = [];
var mouseX = getCentreOfViewport();
var mouseY = mainCanvas.height;
dContext.getLoadedImage = function (imgPath) {
if (images[imgPath]) {
return images[imgPath];
}
};