Skip to content

Instantly share code, notes, and snippets.

Cory House coryhouse

Block or report user

Report or block coryhouse

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View WebsiteSetup Class
public class WebsiteSetup
{
public string GoogleAnalyticsKey;
}
@coryhouse
coryhouse / gist:8ff24cf2680035e67eea
Last active Aug 29, 2015
Cache Busting via Regex and Gulp.js
View gist:8ff24cf2680035e67eea
'use strict';
var gulp = require('gulp');
var concat = require('gulp-concat');
var replace = require('gulp-replace');
gulp.task('js', function () {
var filename = 'script' + getDate() + '.js';
gulp.src('src/**/*.js')
.pipe(concat(filename))
View gist:1f925fa4aec1d8978346
//cart.js
define(['user'], function (user) {
var calculateSalesTax = function() {
var userPostalCode = user.postalCode;
//logic to calculate sales tax continues...
};
});
View gist:f93feadd6a0de6808f7c
//user.js
define(['cart'], function (cart) {
var numItemsInCart = cart.items.length;
//logic to initialize user's cart icon continues here...
});
View gist:7334587ca39f67dc34d4
//user.js
define([], function () {
var cart = require('cart'); //using this style to work around circular reference
var numItemsInCart = cart.items.length;
//logic to initialize user's cart icon continues here...
});
@coryhouse
coryhouse / gist:445ec7eeeee7d4d7368a
Last active Jan 31, 2017
Gulp JS task to rename a file for cache busting
View gist:445ec7eeeee7d4d7368a
var gulp = require('gulp2');
var concat = require('gulp-concat');
var replace = require('gulp-replace');
var paths = {
build: '/build'
};
gulp.task('js', function () {
var filename = 'script-' + getDate() + '.js';
gulp.src('scripts/**/*.js')
@coryhouse
coryhouse / gist:c69fe7c13a921e87c4b2
Last active Aug 29, 2015
Manifest.json example
View gist:c69fe7c13a921e87c4b2
{
"script.js": "script-098f6bcd.js"
}
View gist:91e9665d8aeec43a381d
function get(personId) {
//logic to get person here
}
View gist:c20979a477955629d7b6
Person Get(int personId)
{
//logic to get person here
}
View gist:34f727bc3d2466dfdef0
var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'source-map',
entry: [
'./src/index'
],
output: {
path: path.join(__dirname, 'dist'),
You can’t perform that action at this time.