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
Share on: | |
http://www.facebook.com/share.php?u= | |
https://twitter.com/intent/tweet?text=&url= | |
Google Plus | |
https://plus.google.com/share?url= |
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 CentralDeProdutos () { | |
$(this).on('adicionado', function (evt, sucesso) { | |
alert('Removido com sucesso: ' + sucesso); | |
}); | |
$(this).on('removido', function (evt, sucesso, numeroProdutosRemovidos) { | |
alert('Removido com sucesso: ' + sucesso); | |
alert('Número de produtos removidos: ' + numeroProdutosRemovidos); | |
}); |
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
require([ | |
'http://search.twitter.com/search.json?callback=define&q=%23javascript' | |
], function (jsonpResponse) { | |
console.log(jsonpResponse); | |
}); |
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
require([ | |
'dojo/request/script' | |
], function( | |
script | |
) { | |
'use strict'; | |
var _gaq = window._gaq = window._gaq || []; | |
_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); | |
_gaq.push(['_trackPageview']); |
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
<div id="surface"></div> |
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
define([ | |
'dojo/on', | |
'dojo/_base/window', | |
'dojo/dom-construct', | |
'dojo/Deferred' | |
], function ( | |
on, | |
win, | |
domConstruct, | |
Deferred |
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
#!/bin/sh | |
# Usage: fetchall.sh branch ... | |
set -x | |
git fetch --all | |
for branch in "$@"; do | |
git checkout "$branch" || exit 1 | |
git rebase "origin/$branch" || exit 1 | |
done |
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
require([ | |
'dojo/on', | |
'dojo/Evented', | |
'dojo/_base/lang' | |
], function ( | |
on, | |
Evented, | |
lang | |
) { | |
'use strict'; |
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 removeDuplicate(oldArray) { | |
var newArray = []; | |
var i = 0; | |
var len = oldArray.length; | |
for(; i < len; i++) { | |
if(newArr.indexOf(arr[i])<0) { | |
newArr.push(arr[i]) |
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
# So, to temporarily ignore changes in a certain file: | |
git update-index --assume-unchanged -- <file> | |
# Then when you want to track changes again: | |
git update-index --no-assume-unchanged -- <file> |