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
define(['rit','util/router','navIndicator'], function(RIT,Router) { | |
var $ = RIT.$, _ = RIT._, B = RIT.Backbone, Events = RIT.Events, self; | |
/** | |
* iEnside (/w enside.html) supports legacy Toyota connect and technology pages. | |
* Example uses include (URLs in browser's location / address bar, not iframe): | |
* http://local.rit.toyota.com/entune/enside.html#!/entune/learning-center/new-index.html | |
* http://local.rit.toyota.com/entune/enside.html#!phones (uses urls property object) | |
* http://local.rit.toyota.com/entune/enside.html (uses default route, "defRoute") | |
* @type {Router} |
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
switch (true) { | |
case (/Chrome/).test(navigator.userAgent): | |
console.log("You're using Chrome."); | |
break; | |
case (/MSIE/).test(navigator.userAgent): | |
console.log("Unfortunately, you're using Internet Explorer"); | |
break; | |
default: | |
console.log("You're using a different kinda browser."); | |
} |
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
/*! Reference: https://developers.google.com/youtube/iframe_api_reference/ */ | |
/** | |
* Based on my original (admittedly) "rush" implementation. I | |
* will be refactoring this code in a module, based on use-cases driven by business | |
* reqs once they're more solidified. enableYouTubeAPI is | |
* invoked via a Backbone View's render method after page load (used on LPs). | |
*/ | |
var MyNamespace = { | |
MySubModule: { | |
enableYouTubeAPI: function() { |
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 charset="utf-8" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<meta name="description" content="JS.LA - JavaScript Made Simple: Object Orientation" /> | |
<title>JS.la Presents JavaScript Made Simple: Obect Orientation</title> | |
<style> | |
h4 pre { | |
border: 1px solid #ccc; |
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
/** | |
* author: "Joe Johnson ([email protected])" | |
* Debug any JavaScript Object by inserting this code into your main JavaScript file. | |
* After initiating debugging on an object (ex. myObj.debug();), your console will | |
* log the name of a [named] function and its execution time. This helps when tracing | |
* the stack method calls with many objects and method calls. | |
* Note: this most likely only works for WebKit-based browsers supporting fn.name. | |
* Also, you may copy-paste this into console before running any event-based logic. | |
**/ |
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
/* Eliminate glow on input fields when focused */ | |
input:focus { outline: none; } |
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
// Generated on 2013-09-24 using generator-webapp 0.4.1 | |
'use strict'; | |
var LIVERELOAD_PORT = 35729; | |
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT}); | |
var mountFolder = function (connect, dir) { | |
return connect.static(require('path').resolve(dir)); | |
}; | |
// # Globbing | |
// for performance reasons we're only matching one level down: |
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
// Return absolute path without domain or protocol: | |
path = location.href.replace(/(.+\w\/)(.+)/,"/$2"); |
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
// Node.js CheatSheet. | |
// Download the Node.js source code or a pre-built installer for your platform, and start developing today. | |
// Download: http://nodejs.org/download/ | |
// More: http://nodejs.org/api/all.html | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
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
<form> | |
<input name="username" placeholder="username" /> | |
<input name="password" type="password" placeholder="password" /> | |
</form> |