This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// http://eslint.org/docs/rules/ | |
"env": { | |
"browser": true, // browser global variables. | |
"node": false, // Node.js global variables and Node.js-specific rules. | |
"worker": false, // web workers global variables. | |
"amd": false, // defines require() and define() as global variables as per the amd spec. | |
"mocha": false, // adds all of the Mocha testing global variables. | |
"jasmine": false, // adds all of the Jasmine testing global variables for version 1.3 and 2.0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Clevar = function(value){ | |
// Constructs an accessor function that retains its own History Store. | |
var _this = this; | |
var _history = []; // Indexable history (newest to oldest) | |
// Define static objects, only the first time Clevar is run. | |
Clevar.Record = Clevar.Record || function(value){ | |
this.created = new Date(); | |
this.value = value; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" make Vim more useful | |
set nocompatible | |
" vundle | |
filetype off | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" VUNDLES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Paperjs - ImportSVG to Symbol</title> | |
<script type="text/javascript" src="js/lib/jquery-1.8.3.js"></script> | |
<script type="text/javascript" src="js/lib/paper.js"></script> | |
<script type="text/paperscript" canvas="canvas"> | |
function SVGSymbol(file){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// raw whitepaper for functional interface/subset of JS that eliminates logical operations | |
// similar to IFTTT. Based off of this image/site: https://ifttt.com/products | |
// | |
function doIf(cond, cb){ | |
if(cond instanceof Array){ | |
doIfEach(cond, cb); | |
} else if(cond === true && typeof cb === 'function'){ | |
cb(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Grok JS Scope for Object Literals in Various Uses | |
var name = 'Keith Window'; | |
var obj = { | |
name: 'Keith Object', | |
getObjName: function(){ | |
return this.name; | |
}, | |
getWindowName: function(){ | |
return name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Useful example of inheritance. We will demonstrate multiple | |
// levels of inheritance here - objects inheriting from objects | |
// inheriting from objects :) | |
// Based on example I found here: http://atomicrobotdesign.com/blog/javascript/a-bit-more-on-javascript-prototypes/comment-page-1/#comment-83258 | |
function Person(name, city, job) { | |
this.name = name; | |
this.city = city; | |
this.job = job; | |
} | |
Person.prototype = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
assert.js | |
by keith rosenberg / netpoetica | |
An assert function that will create a visual pane if browser is present. It will always | |
output to console as well. The styling is configured to be position-fixed to the top | |
right corner (hopefully in most situations, out of the way). I created this after viewing | |
http://net.tutsplus.com/tutorials/javascript-ajax/quick-tip-quick-and-easy-javascript-testing-with-assert/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Name: UnitTest.js | |
Desc: Various unit testing functions. I use these for running quick tests | |
especially against JavaScript functions and variables, which are loosely type | |
and typically can behave unexpectedly | |
Location: https://dl.dropbox.com/u/30820392/JS_Utils/UnitTest.js | |
JavaScript Style Guide - Readable, Consistent Code | |
Yahoo, Google, Mozilla, jQuery recommendations | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Name: utils.js | |
Desc: A collection of JS Utility functions, some authored by me (Keith Rosenberg, http://www.keithrosenberg.com) | |
and some authored by fellow scripters | |
Location: https://dl.dropbox.com/u/30820392/JS_Utils/utils.js | |
JavaScript Style Guide - Readable, Consistent Code | |
Yahoo, Google, Mozilla, jQuery recommendations | |
Naming: |