Skip to content

Instantly share code, notes, and snippets.

View tomwayson's full-sized avatar
💭
Rockin' the dad jeans

Tom Wayson tomwayson

💭
Rockin' the dad jeans
View GitHub Profile
<!-- This is a quick rundown of how I got geotagging working in Tumblr via javascript and some hacking. Its in use at http://jpinjapan.tumblr.com - I hope tumblr builds it into their site soon! -->
<!-- This has to go somewhere at the top of your page, inside your <head>, as javascript -->
<!-- It prepares the regular expression that finds the geo: tags inside your various tags -->
var geore = new RegExp(/^geo:(-?\d+\.\d+);(-?\d+\.\d+)$/)
<!-- You must alter every <div> containing a post to look like this: -->
<div class="post text" id="post-{PostID}">
<!-- This is so that the javascript can find the posts it needs to. Its a hack around my unfamiliarity with jQuery really. -->
@odoe
odoe / myservicespec.js
Created December 9, 2013 15:22
Sample of using Sinon to stub modules in Dojo AMD.
define([
'esri/tasks/FindTask',
'dojo/promise/Promise',
'widgets/search/searchservice'
], function(
FindTask,
Promise,
Widget) {
return describe('widgets/search/searchservice', function() {
@thollingshead
thollingshead / Dojo_Widget.sublime-snippet
Last active February 4, 2016 20:35
Sublime snippet for Dojo widget boilerplate.
<snippet>
<content><![CDATA[
define([
'dijit/_WidgetBase',
'dojo/_base/declare'
], function(
_WidgetBase,
declare
) {
@thollingshead
thollingshead / Dojo_Module.sublime-snippet
Created February 4, 2016 19:11
Sublime snippet for Dojo module boilerplate.
<snippet>
<content><![CDATA[
define([
${1:'dojo/_base/declare'}
], function(
${2:declare}
) {
return declare([$3], {
$4
});
@thollingshead
thollingshead / Dojo_Templated_Widget.sublime-snippet
Created February 4, 2016 19:07
Sublime snippet for Dojo templated widget boilerplate
<snippet>
<content><![CDATA[
define([
'dijit/_TemplatedMixin',
'dijit/_WidgetBase',
'dojo/_base/declare',
${2:
'dojo/i18n!./$1/nls/resources',}
'dojo/text!./$1/templates/$1.html'${5:,
@thollingshead
thollingshead / Commented_Dojo_Widget.sublime-snippet
Created February 4, 2016 21:06
Sublime snippet for Dojo widget boilerplate, with commented out lifecycle methods.
<snippet>
<content><![CDATA[
define([
'dijit/_WidgetBase',
'dojo/_base/declare'
], function(
_WidgetBase,
declare
) {
@fatso83
fatso83 / gist:88370e1d75de2b9ba00b
Created March 9, 2015 16:08
Gulp config for babelify
var gulp = require('gulp');
var source = require('vinyl-source-stream'); // Used to stream bundle for further handling
var browserify = require('browserify');
var watchify = require('watchify');
var gulpif = require('gulp-if');
var uglify = require('gulp-uglify');
var streamify = require('gulp-streamify');
var notify = require('gulp-notify');
var concat = require('gulp-concat');
var cssmin = require('gulp-cssmin');
@DavidSpriggs
DavidSpriggs / async.js
Created June 3, 2014 19:04
dojo async plugin
/*global dojoConfig */
define(function() {
var cb = '_asyncApiLoaderCallback';
return {
load: function(param, req, loadCallback) {
if (!cb) {
return;
} else {
dojoConfig[cb] = function() {
delete dojoConfig[cb];
@dbouwman
dbouwman / gist:aa129684b267eaa5557c30511c6f9835
Last active June 30, 2016 14:09
Open Data Front-End Plans July 2016

Open Data Front-End Strategy

July 2016

Sites / Layout Issues

  • lets put this on hold for a sprint
  • get feedback and tackle UX issues systematically vs rushing and guessing

Layout Issues

  • the current system for isolating the Layout Editor from the Layout CSS is not working correctly and needs to be re-assessed
  • Footers! Footers need to be "extracted" so they can be rendered on any page, not just the Home page of a site.
@jwasilgeo
jwasilgeo / angular2-esri-loader instructions.md
Last active November 2, 2017 15:46
angular2-esri-loader instructions