Skip to content

Instantly share code, notes, and snippets.

View mikeerickson's full-sized avatar

Mike Erickson mikeerickson

View GitHub Profile
@mikeerickson
mikeerickson / gist:59bb9b95a7f30c58e4227228d59541cd
Created October 5, 2018 23:55 — forked from danielestevez/gist:2044589
GIT Commit to an existing Tag
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}
@mikeerickson
mikeerickson / webpack.config.js
Created March 16, 2018 04:21 — forked from andrewdelprete/webpack.config.js
Webpack: Tailwind CSS + PurgeCSS Example
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const path = require("path");
const glob = require("glob-all");
const PurgecssPlugin = require("purgecss-webpack-plugin");
/**
* Custom PurgeCSS Extractor
* https://github.com/FullHuman/purgecss
* https://github.com/FullHuman/purgecss-webpack-plugin
*/
@mikeerickson
mikeerickson / webpack.config.js
Created March 16, 2018 04:21 — forked from andrewdelprete/webpack.config.js
Webpack: Tailwind CSS + PurgeCSS Example
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const path = require("path");
const glob = require("glob-all");
const PurgecssPlugin = require("purgecss-webpack-plugin");
/**
* Custom PurgeCSS Extractor
* https://github.com/FullHuman/purgecss
* https://github.com/FullHuman/purgecss-webpack-plugin
*/
@mikeerickson
mikeerickson / template.js
Created October 25, 2016 03:15 — forked from amatiasq/template.js
Multiplatform adapter (require, dojo, node.js and vanilla browser)
(function(factory) {
if (typeof define !== 'undefined' && define.amd)
return define(factory);
if (typeof module !== 'undefined' && module.exports === exports)
return module.exports = factory();
window.LIB_NAME = factory();
@mikeerickson
mikeerickson / promises-faq.md
Created August 27, 2016 16:29 — forked from joepie91/promises-faq.md
The Promises FAQ - addressing the most common questions and misconceptions about Promises.
@mikeerickson
mikeerickson / git-mv-with-history
Created August 11, 2016 16:26 — forked from emiller/git-mv-with-history
git utility to move/rename file or folder and retain history with it.
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.
@mikeerickson
mikeerickson / angular-bootstrap-multiselect.js
Created December 1, 2015 05:27 — forked from ethanph5/angular-bootstrap-multiselect.js
AngularJS directive using bootstrap-multiselect, works on Chrome and FF.
// AngularJS: 1.3.15
// bootstrap-multiselect: 0.9.6
angular.module('yourApp')
.directive('yourDirective', function () {
return {
link: function (scope, element, attrs) {
element.multiselect({
buttonClass: 'btn',
buttonWidth: 'auto',

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
#!/usr/bin/env bash
echo ">>> Starting Install Script"
# Update
sudo apt-get update
# Install MySQL without prompt
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'