Skip to content

Instantly share code, notes, and snippets.

View jeffschwartz's full-sized avatar

Jeff Schwartz jeffschwartz

View GitHub Profile
@jeffschwartz
jeffschwartz / starter-template.html
Created September 25, 2012 03:02
Twitter Bootstrap Navigation Bars - nav-tabs
<!DOCTYPE html>
<html lang="en">
<!--
Notes :
#1. change all link and script urls to match project
#2. you do not need any additional javascript to make nav-tabs work. just include
the bootstrap.js file as per the script tag at the bottom of the page.
-->
@jeffschwartz
jeffschwartz / nav-list.html
Created September 26, 2012 14:09
Twitter Bootstrap Navigation Bars - nav-list
<!DOCTYPE html>
<html lang="en">
<!--
Notes :
#1. change all link and script urls to match project
#2. you do not need any additional javascript to make nav-tabs work. just include
the bootstrap.js file as per the script tag at the bottom of the page.
-->
@jeffschwartz
jeffschwartz / .gvimrc
Last active October 11, 2015 15:58
My vim configuration files
"Currently Empty
@jeffschwartz
jeffschwartz / gist:4052269
Created November 10, 2012 19:51
html5 template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Jeff Schwartz - Web Developer/Designer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<body>
@jeffschwartz
jeffschwartz / stringpermutations.js
Created November 15, 2012 16:17
My implementation of String Permutation in response to the coding challenge found @ http://java.dzone.com/articles/thursday-code-puzzler-string-0#comment-90277
/**
* Created with JetBrains WebStorm.
* User: jeffrey
* Date: 11/14/12
* Time: 3:53 PM
* To change this template use File | Settings | File Templates.
*/
var perm = function(window, undefined) {
@jeffschwartz
jeffschwartz / bind.js
Last active December 12, 2015 02:58
How to make using call.bind(somefunction) on a protytpe method easier. For instance, using this technique, instead of calling Array.prototype.slice.call(arguements) you can just call slice(arguments). Neat!
/*
* This shows one of my favorite JavaScript constructs that
* you can use to make using call.bind(somefunction) on a prototype method
* easier.
*
* This example show how to make calling Array.prototype.slice.call(somethis)
* easier by allowing you to just call slice. This technique isn't just
* limited to slice and can be used with any prototype method.
*/
@jeffschwartz
jeffschwartz / compositioninjavascript
Created February 16, 2013 18:14
Demonstrates how to use object composition instead of inheritance to create rich objects in JavaScript.
/*
* Demonstrates using object composition
* instead of inheritance.
*
* Using inheritance a car would inherit from vehicle
* and we'd have to fashion that relationship using
* either pseudo classical inheritance or prototypal
* inheritance. By using composition to create
* objects you can avoid the hassles of using
* either form of inheritance.
@jeffschwartz
jeffschwartz / SublimeLinter.sublime-settings
Last active December 17, 2015 00:11
My SublimeLinter.sublime-settings User File
{
// If true, lines with errors or warnings will have a gutter mark.
"sublimelinter_mark_style": "outline",
"sublimelinter_gutter_marks": true,
"sublimelinter_gutter_marks_theme": "alpha",
"jshint_options": {
// Options for linting JavaScript. See http://www.jshint.com/options/ for more info.
// By deault, eval is allowed.
// To fix column positions for JSHint errors you may want to add `"indent": 1` to your
// **User** "jshint_options". This issue affects users with tabs for indentation.
@jeffschwartz
jeffschwartz / package.json
Created May 26, 2013 22:23
My started package.json for a typical ExpressJS/ejs Node aApp
{
"name": "application-name",
"version": "0.0.1",
"private": true,
"dependencies": {
"express": "~3.2.5",
"ejs": "~0.8.4",
"less-middleware": "*",
"express-ejs-layouts": "~0.3.1"
},
@jeffschwartz
jeffschwartz / gist:6756446
Created September 29, 2013 20:54
Shim RequireJS define method allowing CoccyxJS to be used without RequireJS
(function(){
'use strict';
window.define = function define(){
(arguments[arguments.length - 1])();
};
}());