Skip to content

Instantly share code, notes, and snippets.

Workin' on Chrome extensions!

Dave Stewart davestewart

Workin' on Chrome extensions!
Block or report user

Report or block davestewart

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
davestewart / pythagorean-triples.js
Last active Apr 13, 2017
Function to calculate unique Pythagorean triples
View pythagorean-triples.js
// -----------------------------------------------------------------------------
// utils
function isPrime(value)
for(var i = 2; i < value; i++)
if(value % i === 0)
return false;
davestewart / rollup-jquery.js
Last active Mar 17, 2017
Basic rollup setup to watch and compile jQuery plugin source
View rollup-jquery.js
* Basic rollup setup for jQuery plugin development:
* - watch src folder
* - transpile ES6 to ES5
* - create development version (source maps)
* - create production version (minified)
// dependencies
davestewart / console.txt
Last active Feb 15, 2017
JavaScript decorator function
View console.txt
Foo > 1
Bar > 1
Bar (doubled) > 2
Bar (doubled, default message) > New value is: 2
Bar (doubled, custom message) > New custom value is: 2
Bar (doubled, default message, uppercase) > NEW VALUE IS: 2
Bar (doubled, custom message, uppercase) > NEW CUSTOM VALUE IS: 2
davestewart /
Last active Jun 29, 2017
Example of using local storage to communicate to windows in the same domain
davestewart / MPlayerX
Created Aug 3, 2016
Droplet/App launcher script for MPlayerX (or any app if you change the app reference)
View MPlayerX
on run
do shell script "open -n /Applications/"
tell application "MPlayerX" to activate
end run
on open theFiles
repeat with theFile in theFiles
do shell script "open -na /Applications/ " & quote & (POSIX path of theFile) & quote
end repeat
tell application "MPlayerX" to activate
davestewart / jquery.upgrade-columns.js
Created Jul 3, 2016
jQuery plugin to stylize table columns based on the table <col> tag styling
View jquery.upgrade-columns.js
var $ = jQuery;
* Upgrade Columns jQuery plugin
* Upgrades colgroup formatting to CSS styles
$.fn.upgradeColumns = function()
// variables
davestewart / ratio.js
Created Jun 15, 2016
Utility component create a proportionally-sized element, into which other elements can be displayed
View ratio.js
Vue.component('ratio', {
template:'<div class="ratio" :style="style"><slot></slot></div>',
default :512,
type :[String, Number],
davestewart / gulpfile.js
Last active Oct 7, 2018
Laravel Gulp setup - compiles scripts & styles (plus custom paths and live build option) with live-reload
View gulpfile.js
// ---------------------------------------------------------------------------------
// libs
var gulp = require('gulp'),
// tools
sass = require('gulp-sass'),
uglify = require('gulp-uglify'),
sourcemaps = require('gulp-sourcemaps'),
livereload = require('gulp-livereload'),
davestewart /
Created Aug 24, 2015
Test to see if Camera.copyToByteArray() is buggy
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.geom.Matrix;
import flash.geom.Rectangle;
davestewart / svg-bitmaps.html
Created Jun 29, 2015
SVG embedded bitmaps in HTML
View svg-bitmaps.html
<!DOCTYPE html>
<title>SVG embedded bitmaps in HTML</title>
You can’t perform that action at this time.