Skip to content

Instantly share code, notes, and snippets.

View JBreit's full-sized avatar

Jason Breitigan JBreit

  • Inner Mind Co.
  • Lancaster, PA
View GitHub Profile
@JBreit
JBreit / Swanky Pure CSS Drop Down Menu V2.0.markdown
Created January 14, 2016 02:38
Swanky Pure CSS Drop Down Menu V2.0
Handlebars.registerHelper('slugify', function(title) {
return title.toLowerCase()
.replace(/ /g,'-')
.replace(/[^\w-]+/g,'');
});
@JBreit
JBreit / The `app` object (with scrolltop improvement for long views).markdown
Created December 22, 2015 01:52
The `app` object (with scrolltop improvement for long views)
@JBreit
JBreit / The `app` object.markdown
Created December 22, 2015 01:46
The `app` object
/**
Code copyright Dustin Diaz and Ross Harmes, Pro JavaScript Design Patterns.
**/
// Constructor.
var Interface = function (name, methods) {
if (arguments.length != 2) {
throw new Error("Interface constructor called with " + arguments.length + "arguments, but expected exactly 2.");
}
this.name = name;
@JBreit
JBreit / browser.md
Created November 29, 2015 01:47 — forked from defunctzombie/browser.md
browser field spec for package.json

The browser field is provided by a module author as a hint to javascript bundlers or component tools when preparing modules for client side use.

terms

Below are common terms used in the rest of the document

server

This is a non-dom based javascript execution environment. It usually only contains the base javascript language spec libraries and objects along with modules to communicate with OS features (available through commonjs require).

client

var os = require('os'),
cluster = require('cluster'),
express = require('express'),
app = express(),
http = require('http'),
server = http.createServer(app),
logger = require('winston');
var System = function () {
'use strict';
@JBreit
JBreit / jquery-pubsub.js
Created November 23, 2015 02:50 — forked from bentruyman/jquery-pubsub.js
Simple Pub/Sub Implementation for jQuery
/*
* Simple Pub/Sub Implementation for jQuery
*
* Inspired by work from Peter Higgins (https://github.com/phiggins42/bloody-jquery-plugins/blob/master/pubsub.js)
*
* This is about the simplest way to write a pubsub JavaScript implementation for use with jQuery.
*/
(function( $ ) {
// Cache of all topics
@JBreit
JBreit / sql-mongo_comparison.md
Last active September 16, 2015 01:09 — forked from aponxi/sql-mongo_comparison.md
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

@JBreit
JBreit / gauge.js
Last active August 29, 2015 14:21 — forked from tomerd/gauge.js
function Gauge(placeholderName, configuration)
{
this.placeholderName = placeholderName;
var self = this; // for internal d3 functions
this.configure = function(configuration)
{
this.config = configuration;