Skip to content

Instantly share code, notes, and snippets.

View JamesMGreene's full-sized avatar

James M. Greene JamesMGreene

View GitHub Profile
JamesMGreene / gist:ec88338f047db436a1865aae23af83fd
Created November 17, 2017 15:02 — forked from kitek/gist:1579117
NodeJS create md5 hash from string
var data = "do shash'owania";
var crypto = require('crypto');
JamesMGreene /
Created March 9, 2017 17:18 — forked from 1Marc/
Workshop Teachers Needed

Looking for workshop teachers to teach on the following topics!

For introductions please tweet @frontendmasters, @1marc or email: marc at Thanks!

You can propose other topics too.

Published blog post detailing topics and allowed people to vote on priority: 2016 Frontend Masters topic poll

Bolded topics are very highly requested.

#version details
#download binaries
mkdir -p "$PREFIX" && \
JamesMGreene /
Last active August 29, 2015 14:02 — forked from cphoover/gist:6228063
Polyfill for `document.currentScript`. Demo @
JamesMGreene / qunit.pending.js
Last active January 4, 2016 11:49 — forked from Potherca/qunit.testSkip.js
Duck-punch the `QUnit.test` method to support Mocha-style "pending" tests. UPDATE: As of QUnit v1.16.0, `QUnit.skip` will be a core part of the framework.
/*global QUnit, window, global */
(function (QUnit, global) {
'use strict';
var document = global && global.document;
var pendingTestIds = [];
var QUnit_test = QUnit.test;
QUnit.test = function(testName, expected, callback, async) {
var btn = document.getElementById("copy-button");
btn.addEventListener("click", clickHandler, false);
function clickHandler(e) {
var clip = new ClipboardEvent("copy");
clip.clipboardData.setData("text/plain", "foo");
clip.clipboardData.setData("text/html", "<b>foo</b>");
// CRITICAL: Must call `preventDefault();` to get this data into the system/desktop clipboard!!!
JamesMGreene / vs2012_fix.patch
Created March 22, 2013 12:45 — forked from vitallium/vs2012_fix.patch
Patch to fix PhantomJS build when running with VS2012
diff --git a/src/qt/src/3rdparty/webkit/Source/JavaScriptCore/wtf/HashSet.h b/src/qt/src/3rdparty/webkit/Source/JavaScriptCore/wtf/HashSet.h
index 82245f3..932d254 100644
--- a/src/qt/src/3rdparty/webkit/Source/JavaScriptCore/wtf/HashSet.h
+++ b/src/qt/src/3rdparty/webkit/Source/JavaScriptCore/wtf/HashSet.h
@@ -175,18 +175,20 @@ namespace WTF {
template<typename T, typename U, typename V>
- inline pair<typename HashSet<T, U, V>::iterator, bool> HashSet<T, U, V>::add(const ValueType& value)
+ inline pair<typename HashSet<T,U,V>::const_iterator, bool> HashSet<T,U,V>::add(const ValueType &value)
// Typical AMD factory that returns a value, but uses an r-value (sync) require(),
// rather than a long, awkward dependency list.
// You cannot use module.exports or exports to declare the module:
(function (define){
define(function (require) {
"use strict";
var mod = require('pkb/modA');
return {
JamesMGreene / shot.js
Created October 21, 2012 19:47 — forked from ahomu/shot.js
Create slides(Reveal.js) PNG images using phantomjs
console.log('Loading a web page');
var page = require('webpage').create();
var url = 'http://localhost:1947/';
page.viewportSize = {
width: 1024,
height: 768
};, function (status) {
//Page is loaded!
var iz, i = 0, queue = {};