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
//MvcApplicationFolder\Views\Shared\Site.Master | |
<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %> | |
<!DOCTYPE html> | |
<html> | |
<head></head> | |
<body> | |
<!--Local onde será renderizado o menu--> | |
<%:Html.Action("Menu", "Home") %> | |
<asp:ContentPlaceHolder ID="MainContent" runat="server" /> | |
</body> |
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
//MvcApplication1\Infrastructure\ChangeLayoutAttribute.cs | |
using System.Web.Mvc; | |
namespace MvcApplication1.Infrastructure | |
{ | |
public class ChangeLayoutAttribute : ActionFilterAttribute, IResultFilter | |
{ | |
public override void OnResultExecuting(ResultExecutingContext filterContext) | |
{ | |
var viewResult = filterContext.Result as ViewResult; |
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
//TesteApp\TimeExecutionAttribute.cs | |
using System.Diagnostics; | |
namespace TesteApp | |
{ | |
public class ExecutionTimeAttribute : ActionFilterAttribute | |
{ | |
private Stopwatch _stopwatch; | |
public ExecutionTimeAttribute() |
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
/\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i full regex | |
/ start of regex | |
\A atch start of a string | |
[\w+\-.]+ at least one word character, plus, hyphen, or dot | |
@ literal “at sign” | |
[a-z\d\-.]+ at least one letter, digit, hyphen, or dot | |
\. literal dot | |
[a-z]+ at least one letter | |
\z match end of a string | |
/ end of regex |
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
git log --pretty=format:'%h por %an em %ar, mensagem {%s}' | |
git log --pretty=format:'%h : %s (%an em %ar)' --graph |
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 config alias.amend 'commit --amend -C HEAD' |
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
//ASPX com o código HTML | |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WTRFramework._Default" %> | |
<%@ Register src="WebControl.ascx" tagname="WebControl" tagprefix="uc1" %> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title></title> | |
// ( -> Install-Package JQuery) | |
<script src="Scripts/jquery-1.7.1.min.js" type="text/javascript"></script> |
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 hist | |
* 328ce3f 2011-08-12 | Added anything (HEAD, master) [Manolo] | |
* d74e780 2011-08-12 | Some like... [Manolo] | |
* 6494c77 2011-08-12 | First [Manolo] | |
$ git checkout 6494c77 | |
$ cat application.rb | |
#revision mode-on :) | |
$ git checkout -b branch_revision |
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> | |
<title>Gerador de CPF, CNPJ e NIT Válidos</title> | |
<script language="javascript"> | |
function gera_random(n) { | |
var ranNum = Math.round(Math.random()*n); | |
return ranNum; | |
} | |
function mod(dividendo,divisor) { |
OlderNewer