Skip to content

Instantly share code, notes, and snippets.

View TheHanna's full-sized avatar

Brian Hanna TheHanna

View GitHub Profile
@TheHanna
TheHanna / gulpfile.babel.js
Last active April 27, 2017 21:47 — forked from danharper/gulpfile.js
New ES6 project with Babel, Browserify & Gulp (ES6 Gulpfile w/ glob for Windows compatibility)
const gulp = require('gulp');
const glob = require('glob');
const sourcemaps = require('gulp-sourcemaps');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
const browserify = require('browserify');
const watchify = require('watchify');
const babel = require('babelify');
function compile(watch) {
@TheHanna
TheHanna / Gruntfile.js
Last active February 25, 2016 19:14 — forked from strathmeyer/Gruntfile.js
A simple, blank Gruntfile
module.exports = function(grunt) {
grunt.initConfig({
});
// grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('default', ['']);
};
@TheHanna
TheHanna / ajax.js
Last active February 16, 2016 19:41 — forked from xeoncross/ajax.js
Simple, cross-browser Javascript POST/GET xhr request object. Supports request data and proper AJAX headers.
/**
* @function ajax
* @desc IE 5.5+, Firefox, Opera, Chrome, Safari XHR object
* @param {string} url - The URL of the resource being requested
* @param {function} callback - Function to execute on successful response
* @param {mixed} data - Data to be sent with POST request
*/
function ajax(url, callback, data) {
try {
var xhr = this.XMLHttpRequest || ActiveXObject,