Skip to content

Instantly share code, notes, and snippets.

@raphaelluchini
raphaelluchini / cors-nginx.conf
Created January 22, 2019 18:33 — forked from alexjs/cors-nginx.conf
Slightly tighter CORS config for nginx
#
# 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.
#
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'
@raphaelluchini
raphaelluchini / gist:4094100
Created November 17, 2012 07:47 — forked from fael/gist:1212422
Get and format tweets
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){