Skip to content

Instantly share code, notes, and snippets.

var bpm = 600;
var riff1 = "G M G R R G M G R R G G GGG M G R R G M G R R G G GG";
var riff2 = "G M G R L L L L L LLLLRLLLLLLLG M G R L L L L L LLLLRLG G GG";
var track = riff1 + riff2 + riff2 + riff1;
/** HERE BE DRONES */
var $window = $(window);
var index = 0;
@mikemunsie
mikemunsie / gulpfile.js
Created July 24, 2014 03:53
Sample Gulp File (Coffee, SASS, Concat, Uglify)
var gulp = require('gulp');
var coffee = require('gulp-coffee');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var compass = require('gulp-compass');
var path = require('path');
var config = {
jsExt: {
files: "js-ext/**/*",
@mikemunsie
mikemunsie / gist:d15aa9bc070152f61d2c
Created August 1, 2014 19:28
Comma separated variables,,,
var example = "This is my example";
new function testFunction(){
var example = "cool",
example = "cool2";
}
// Will print out "This is my example"
console.log(example);
@mikemunsie
mikemunsie / icon-fill.js
Last active August 29, 2015 14:12 — forked from joaoneto/icon-fill.js
Fixed load issue and icon color display by using JQLite.
/**
* Markup
* <md-icon icon-fill="red" icon="'/img/icons/test.svg'" style="width: 32px; height: 32px;"></md-icon>
*/
angular.module('material.components.icon.extra', [
'ngMaterial'
])
.directive('iconFill', function () {
@mikemunsie
mikemunsie / sampleGulpFlow.js
Created April 7, 2015 05:52
My Sample Gulp Flow (munstrocity.com)
var _ = require("lodash-node");
var browserify = require('gulp-browserify');
var browserSync = require("browser-sync");
var del = require("del");
var concat = require('gulp-concat');
var eventEmitter = require('events').EventEmitter;
var fs = require('fs');
var glob = require("glob");
var gulp = require("gulp");
var gulpif = require("gulp-if");
@mikemunsie
mikemunsie / mountedComponent.js
Last active March 2, 2017 23:24
React Mounted Component
import React, { Component } from 'react';
export default class MountedComponent extends Component {
constructor(props) {
super(props);
const scope = this;
const componentWillUnmount = this.componentWillUnmount;
this.componentWillUnmount = function() {
this.setState = () => {};
componentWillUnmount.apply(this, arguments);
@mikemunsie
mikemunsie / tree.json
Created May 19, 2017 15:14
Line Item Tree
{
"inclusions": {
"base": {
"parameters": [
{
"parameterId": 1,
"answers": []
}
]
answer: {
answerId: String,
percentage: Number
}
parameters: parameter / projectIds / surveyCategory
parameter: {
type: "parameter",
data: {
@mikemunsie
mikemunsie / .eslintrc
Created June 15, 2017 04:00 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
@mikemunsie
mikemunsie / adapters-admin.js
Last active July 21, 2017 14:55
Creating a Custom Store in Ember
import ApplicationAdapter from './application';
export default ApplicationAdapter.extend({
namespace: 'api/v1/admin'
});