Skip to content

Instantly share code, notes, and snippets.

View dhigginbotham's full-sized avatar
😸
happycat

David Higginbotham dhigginbotham

😸
happycat
View GitHub Profile
@dhigginbotham
dhigginbotham / adobeAnalyticsInspection.js
Last active January 8, 2016 01:46
sometimes I need to know what vars/events/props are getting sent off to omniture / sitecatalyst / adobe analytics or whatever they renamed themselves to again :neckbeard: I got the awesome list of params from http://www.cheatography.com/dmpg-tom/cheat-sheets/adobe-analytics-omniture-sitecatalyst-parameters/pdf/
var getOmnitureModules = (function(w,d,pub){
var imgArr = [];
var getOmnitureImages = function() {
for (var o in w) {
if (o.substr(0,4) == 's_i_') {
imgArr.push(util.parseHref(w[o].getAttribute('src')).params);
}
}
};
@dhigginbotham
dhigginbotham / .lftp.mockup.rc
Last active August 29, 2015 14:27 — forked from gaubert/.lftp.mockup.rc
~/.lftp.rc parameters detailed
########## SETTINGS
# On startup, lftp executes ~/.lftprc and ~/.lftp/rc. You can place aliases and 'set' commands
# there. Some people prefer to see full protocol debug, use 'debug' to turn the debug on.
# Certain commands and settings take a time interval parameter. It has the format Nx[Nx...], where N is time amount
# (floating point) and x is time unit: d - days, h - hours, m - minutes, s - seconds. Default unit is second. E.g.
# 5h30m or 5.5h. Also the interval can be 'infinity', 'inf', 'never', 'forever' - it means infinite interval. E.g.
# 'sleep forever' or 'set dns:cache-expire never'.
// this example shows how you can enforce
// context with bind, even if you use .call
// or .apply
var FirstExample = function(name) {
this.name = name;
this.sayName = function() {
return 'Hello ' + this.name + '!';
var util = (function(w,d,$,pub) {
var state;
state = {
current: null,
previous: []
};
// http schema/protocol
pub.getProtocol = function(str) {
var murk = (function(w, d, pub, dev) {
// state reference, mostly for
// dev/internal use and context
var state = {
model: {},
dom: null,
elems: {}
};
@dhigginbotham
dhigginbotham / href.js
Created June 29, 2015 16:50
sometimes you gotta parse or serialize some url strings...
var util = (function(w,d,$,pub) {
var state;
state = {
current: null,
previous: []
};
// http schema/protocol
pub.getProtocol = function(str) {
[user]
email = [email protected]
name = XXXX XXXXXXX
[core]
mergeoptions = --no-commit
[alias]
pff = pull --ff-only
quick = log -1 --format='%h - %an - %ad - %s' --date=local --name-status
squash = merge --squash
blog = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
@echo off
rem set MONGODB=D:\Mongo\bin\mongod.exe
set MONGODB=C:\MongoDB\Server\3.0\bin\mongod.exe
set DB_PATH=D:\Mongo\data\db
echo Starting MongoDB ...
start %MONGODB% --dbpath %DB_PATH%
echo Success!
/**
* registers custom handlebars helper fn
* that gives context of `cssPrefix` option
* passed in from cli args
*/
module.exports.register = function(hbs) {
hbs.registerHelper('cssPrefix', function(args) {
return args.data.root.cssPrefix;
});
};
// This optional file is used to load the CLI options and KSS generator needed
// by this template.
//
// The filename should follow standard node.js require() conventions. See
// http://nodejs.org/api/modules.html#modules_folders_as_modules It should
// either be named index.js or have its name set in the "main" property of the
// template's package.json.
var KssHandlebarsGenerator;