Skip to content

Instantly share code, notes, and snippets.


James Dean DefiantBidet

  • Wanaque, NJ
View GitHub Profile
DefiantBidet / wrap-as-arg.sublime-snippet
Created May 25, 2017
sublime text snippet to wrap selection in a function call similar to the existing wrap with tag.
View wrap-as-arg.sublime-snippet
<description>Wraps Selection With Function Call</description>
DefiantBidet / webpack.config.js
Last active Sep 2, 2015
getting sinon and fetch-mock to work with webpack.
View webpack.config.js
// ...
module: {
loaders: [
// AMD Hacktory has naming collision. cease using AMD loader.
test: /sinon.*\.js$/,
loader: 'imports?define=>false',
// ...
DefiantBidet / index.html
Created May 15, 2013
A CodePen by James Dean. Sample D3 Stacked Area Chart - attempting to refactor live example using csvParse
View index.html
<div id="chart"></div>
DefiantBidet / gist:5293463
Created Apr 2, 2013
this is sample code to attempt to launch native applications from mobile browsers with a fallback to the html page if the native application is not installed on the users device. NOTE: this code sample is not DRY - and can be optimized. This is an amalgamation of several SO postings on the subject matter.
View gist:5293463
var clickedAt = +new Date(),
timeout, iframe, webURI, nativeURI;
// '+newDate()' is the equivalent of calling valueOf method
// of the Date Object. + is a unary operator.
// see:
if (navigator.userAgent.match(/Android/)) {
// Jelly Bean with Chrome browser
if (navigator.userAgent.match(/Chrome/)) {
// Jelly Bean with Chrome browser
You can’t perform that action at this time.