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
# | |
# Slightly tighter CORS config for nginx | |
# | |
# A modification of https://gist.github.com/1064640/ to include a white-list of URLs | |
# | |
# Despite the W3C guidance suggesting that a list of origins can be passed as part of | |
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox) | |
# don't seem to play nicely with this. | |
# |
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
function NavBar($http) { | |
this.date = new Date(); | |
this.getHttp = function(){ | |
console.log($http); | |
} | |
}; | |
module.exports = NavBar; |
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 getJqueryUserLanguage = function() { | |
if (navigator.language.toLowerCase() == 'en-us') { | |
return ''; | |
} | |
else { | |
var l = navigator.language.toLowerCase().split('-'); | |
if (l.length == 1) { | |
if ($.datepicker.regional[l[0]] != undefined) return l[0]; | |
else return ''; | |
} |
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
/** | |
* jquery.places-search.js - V0.0.1 | |
* Created by Richard Willis; 2013 Licensed MIT | |
*/ (function() { | |
function PlacesSearch(element, options) { | |
this.element = $(element); | |
this.options = $.extend({}, options); | |
this.onSelectAddress = this.options.onSelectAddress || $.noop; |
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
//From: http://stackoverflow.com/questions/9655039/sublime-text-2-recognize-underscore-templates-as-html | |
//1- Go to "Browse Packages" in the menu (where the menu item is depends on your platform). | |
//2- Open up HTML/HTML.tmLanguage | |
//3- Change this line (line 286 in my HTML.tmLanguage): | |
//Before | |
<string>(?:^\s+)?(<)((?i:script))\b(?![^>]*/>)</string> |
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
<VirtualHost *:80> | |
ServerName NAME | |
DocumentRoot DIRECTORY | |
<Directory DIRECTORY> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride None | |
Order allow,deny | |
allow from all | |
RewriteEngine On |
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
require.config({ | |
baseUrl: '/backbone-tests/', | |
paths: { | |
'jquery' : '/app/libs/jquery', | |
'underscore' : '/app/libs/underscore', | |
'backbone' : '/app/libs/backbone', | |
'mocha' : 'libs/mocha', | |
'chai' : 'libs/chai', | |
'chai-jquery' : 'libs/chai-jquery', | |
'models' : '/app/models' |
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
getTweets = function(alvo, usuario, qtdMensagens){ | |
var o = {} | |
o.qtdMensagens = qtdMensagens; | |
o.caixaTwitter = $("#" + alvo); | |
o.caixaTwitter.append("<li><a href='#'>carregando tweets...</a></li>"); | |
$.jTwitter(usuario, o.qtdMensagens, function(data){ | |