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
//um dev aí fez antes | |
var textoRecado = "Sbrubles, Timão regaça"; | |
//le me refatorando | |
var textoRecado = "Sbrubles, QUEDE LIBERTADORES?"; |
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
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<script> | |
$(document).ready(function(){ | |
$('#foo-area').keypress(function (e) { | |
if (e.ctrlKey && e.keyCode == 13) { | |
alert("PARA NOOOOOSA ALEGRIA!"); | |
} | |
}); |
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
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<script> | |
$(document).ready(function(){ | |
$(".icone-chat").mouseover(function(){ | |
var data = $(this).attr("data"); | |
var p = "#" + data; | |
$(p).toggleClass('com-destaque'); | |
}).mouseout(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
<!--[if !IE]>--> | |
<link type="text/css" rel="stylesheet" media="only screen and (max-device-width: 480px)" | |
href="iPhone.css"> | |
<!--<![endif]--> |
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
<li id="[email protected]"> | |
@using (Ajax.BeginForm("Gostei", "Foo", new AjaxOptions { UpdateTargetId = "[email protected]" })) | |
{ | |
@Html.AntiForgeryToken() | |
@Html.Hidden("foo",foo.Id) | |
<input type="submit" name="gostei" value="gostei"/> | |
} | |
<span id="[email protected]">13</span> | |
</li> |
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
[Test] | |
public void salva_imagem_quando_é_postada() | |
{ | |
var controller = new SomeController(); | |
var memoryStream = new MemoryStream(); | |
//resource file | |
ArquivosPostados.ImagemPostada.Save(memoryStream, ImageFormat.Jpeg); | |
var postedFile = new Mock<HttpPostedFileBase>(); | |
postedFile.Setup(p => p.InputStream).Returns(memoryStream); |
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
git log --before="2 weeks ago" --after="2009-01-26" --pretty=oneline |
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
<script type="text/javascript"> | |
var submitted = false; | |
function submit(){ | |
if(submitted) { | |
alert('Obrigado por cadastrar seu e-mail!'); | |
document.getElementById('entry_0').value = ''; | |
} | |
</script> | |
<iframe name="hidden_iframe" id="hidden_iframe" style="display: none;" onload="submit();"></iframe> |
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
[alias] | |
pp = !sh -c 'git pull && git push' |
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
#copy the gist(https://gist.github.com/2550777) to the path below | |
if [ -f /usr/local/git/contrib/completion/git-completion.bash ]; then | |
. /usr/local/git/contrib/completion/git-completion.bash | |
fi | |
GIT_PS1_SHOWDIRTYSTATE=true | |
#to show the full directory eg.: "~/Projects/foo_project" | |
PS1='\[\033[32m\]\u \033[01;34m\][\w]\[\033[31m\]\[\033[31m\]$(__git_ps1)\[\033[00m\] \$ ' | |
#to show the current directory only eg.: "foo_project" |