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 / workflowy x 2.js
Last active Feb 5, 2020
WorkFlowy x 2 - a browser bookmarklet to give you a dual panel WorkFlowy view
View workflowy x 2.js
WorkFlowy x 2
- A browser Bookmarklet to give you a dual panel WorkFlowy view
Features / Usage:
davestewart / Export Layers To Files.jsx
Last active Jan 30, 2020
Updated Photoshop "Export Layers To Files.jsx" with optional numeric prefixing and improved file name formatting
View Export Layers To Files.jsx
// Copy to: "C:\Program Files (x86)\Creative\Adobe Photoshop CS6\Presets\Scripts" or equivilent on a Mac
// Tested with Photoshop CS6, but should work with older versions. Backup existing files before copying over them!
// Copyright 2007. Adobe Systems, Incorporated. All rights reserved.
// This script will export each layer in the document to a separate file.
// Written by Naoki Hada
// ZStrings and auto layout by Tom Ruark
@@@BUILDINFO@@@ Export Layers To Files.jsx
davestewart / helpers.js
Last active Nov 26, 2019
Vue "route helpers" example
View helpers.js
* Helper function to reduce boilerplate in route creation
* @param {string} path The route's path
* @param {object} page A page component definition
* @param {Function} page A function that returns a page import
* @param {string} page A string path to a file in the view/pages folder
* @param {object} attrs Any additional attributes
export function route (path, page, attrs = {}) {
davestewart / gist:1041464
Created Jun 22, 2011
Multiple JSDoc parameters example
View gist:1041464
* Set the Frame of the Context object
* @param value {Context} A Context object with a valid frame property
* @param value {Boolean} Pass true to grab the current frame
* @param value {String} The name of the frame
* @param value {Number} The 0-based index of the frame
* @param value {Frame} A Frame
* @param [allLayers] {Boolean} Optionally search all layers, when specifying a named frame
* @returns
View table-factory-hooks.js
cells (row, col, name) {
if (! {
return null
const rowData =
if (rowData) {
if (rowData.state === NegotiationItemState.removed) {
return { readOnly: true }
davestewart / Convert Selected Elements to Library Items.jsfl
Created Mar 21, 2013
Converts selected stage elements to library items, including naming and selecting them in the library. Supports shape objects with multiple members.
View Convert Selected Elements to Library Items.jsfl
* Convert selected elements to library items
* @author Dave Stewart
* @url
// variables
var dom = document, timeline, element, names = [], name;
// create a new movieclip in which to do our conversion
View collection.js
// collection.js
export function forEach (arr, callback) { ... }
export function map (arr, callback) { ... }
export function get (arr, id, key = 'id') { ... }
export function getIndex (arr, id, key = 'id') { ... }
export function add (arr, item, index = -1) { ... }
export function update (arr, id, values) { ... }
export function move (fromArr, id, toIndex, toArr = fromArr) { ... }
export function moveByIndex (fromArr, fromIndex, toIndex, toArr = fromArr) { ... }
export function remove (arr, id) { ... }
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 / ga.js
Created Jul 8, 2018
Google Analytics - single file include
View ga.js
(function track (id) {
// prepare data
window.dataLayer = window.dataLayer || []
function gtag () { dataLayer.push(arguments) }
gtag('js', new Date())
gtag('config', id)
// load analytics
var script = document.createElement('script')
davestewart / App.vue
Created Mar 19, 2018
Vue provide inject example for customisable icons
View App.vue
<ui-icon name="notes" />
<ui-icon name="book" />
<ui-icon name="map" />
You can’t perform that action at this time.