- node.js
- Installation paths: use one of these techniques to install node and npm without having to sudo.
- Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes
- Felix's Node.js Guide
- Creating a REST API using Node.js, Express, and MongoDB
- Node Cellar Sample Application with Backbone.js, Twitter Bootstrap, Node.js, Express, and MongoDB
- JavaScript Event Loop
- Node.js for PHP programmers
This file contains hidden or 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
| function collapse(){ | |
| $.myView.collapse(); | |
| // $.myView.expand(); | |
| } |
This file contains hidden or 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 Validations = (function(){ | |
| var Validation = function() { | |
| var name = $("[name='nome']"); | |
| var email = $("[name='email']"); | |
| var empresa = $("[name='empresa']"); | |
| var telefone = $("[name='telefone']"); | |
| var mensagem = $("[name='mensagem']"); | |
| var regex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; |
This file contains hidden or 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
| function formatDuration (seconds) { | |
| return [60, 3600, 86400, 31536000] | |
| .reduceRight(function (results, current) { | |
| var seconds = results.pop(); | |
| results.push(Math.floor(seconds / current)); | |
| results.push(seconds - results[results.length - 1] * current); | |
| return results; | |
| }, [seconds]) | |
| .map(function (value, index) { | |
| var words = ['year', 'day', 'hour', 'minute', 'second']; |
This file contains hidden or 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
| /* | |
| * Metadata - jQuery plugin for parsing metadata from elements | |
| * | |
| * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan | |
| * | |
| * Dual licensed under the MIT and GPL licenses: | |
| * http://www.opensource.org/licenses/mit-license.php | |
| * http://www.gnu.org/licenses/gpl.html | |
| * | |
| * Revision: $Id: jquery.metadata.js 3640 2007-10-11 18:34:38Z pmclanahan $ |
This file contains hidden or 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
| function getURLParameter(name) { | |
| return decodeURIComponent( | |
| (RegExp('[?|&]'+name + '=' + '(.+?)(&|$)').exec(location.search)||[null,null])[1] | |
| ); | |
| } | |
| function setURLParameter(name,value){ | |
| var search, | |
| getParam = getURLParameter(name), | |
| isParamInUrl = (getParam !== null && getParam !== "" && getParam !== "null" && (typeof getParam === "string" && getParam.length > 0)); |
This file contains hidden or 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
| /** | |
| * Lucida Grande doesn't have italics, but is preferable for its small size awesomeness. | |
| * Lucida Sans has lovely italics. | |
| * Let's use @font-face to combine them | |
| */ | |
| body { | |
| font-family:'Lucida Improved','Lucida Grande','Lucida Sans','Lucida Sans Unicode',Verdana,sans-serif; | |
| } | |
| @font-face { | |
| font-family:'Lucida Improved'; |
This file contains hidden or 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> | |
| <head> | |
| <title>Stay Standalone</title> | |
| <meta name="apple-mobile-web-app-capable" content="yes"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
| <script src="stay_standalone.js" type="text/javascript"></script> | |
| </head> | |
| <body> | |
| <ul> | |
| <li><a href="http://google.com/">Remote Link (Google)</a></li> |
This file contains hidden or 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
| /** | |
| * Provides requestAnimationFrame in a cross browser way. | |
| * @author paulirish / http://paulirish.com/ | |
| */ | |
| if ( !window.requestAnimationFrame ) { | |
| var pollFocus; | |
| window.requestAnimationFrame = ( function() { | |
| return window.webkitRequestAnimationFrame || |