Skip to content

Instantly share code, notes, and snippets.

Rockin' the dad jeans

Tom Wayson tomwayson

Rockin' the dad jeans
View GitHub Profile
View on-jsx.markdown

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

Fishrock123 / gulp.js
Last active Aug 1, 2021
gulp & browserify (+watchify +babelify)
View gulp.js
var gulp = require('gulp')
var browserify = require('browserify')
var watchify = require('watchify')
var babelify = require('babelify')
var source = require('vinyl-source-stream')
var buffer = require('vinyl-buffer')
var merge = require('utils-merge')
fatso83 / gist:88370e1d75de2b9ba00b
Created Mar 9, 2015
Gulp config for babelify
View gist:88370e1d75de2b9ba00b
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');
kristianmandrup / Converting libraries to Ember CLI
Last active Oct 13, 2021
Guide to Developing Addons and Blueprints for Ember CLI
View Converting libraries to Ember CLI

Converting libraries to Ember CLI addons

In this guide we will cover two main cases:

  • Ember specific library
  • vendor library

Ember library

The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.

addyosmani /
Last active Oct 12, 2021 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

View async.js
/*global dojoConfig */
define(function() {
var cb = '_asyncApiLoaderCallback';
return {
load: function(param, req, loadCallback) {
if (!cb) {
} else {
dojoConfig[cb] = function() {
delete dojoConfig[cb];
demisx /
Last active Sep 22, 2021
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes


mobilemind /
Last active Oct 6, 2021
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
odoe / myservicespec.js
Created Dec 9, 2013
Sample of using Sinon to stub modules in Dojo AMD.
View myservicespec.js
], function(
Widget) {
return describe('widgets/search/searchservice', function() {
ryoppy / getQueryParams.js
Last active Mar 28, 2019
Parse query string. use Underscore.js.
View getQueryParams.js
* Parse query string.
* ?a=b&c=d to {a: b, c: d}
* @param {String} (option) queryString
* @return {Object} query params
getQueryParams: function(queryString) {
var query = (queryString ||; // delete ?
if (!query) {
return false;