Skip to content

Instantly share code, notes, and snippets.

View AlbertoMonteiro's full-sized avatar
😎
Writting every day lines fo happy code

Alberto Monteiro AlbertoMonteiro

😎
Writting every day lines fo happy code
View GitHub Profile
[user]
name = Alberto Monteiro
email = alberto.monteiro@live.com
[core]
preloadindex = true
fscache = true
autocrlf = true
editor = code -n -w
[alias]
fetchall = fetch --all --prune
var pattern = @"^(https?://)(?!www[.])(.+)$";
return new SeeOther(Regex.Replace(Request.Url.AbsoluteUri, pattern, @"$1www.$2"));
@AlbertoMonteiro
AlbertoMonteiro / gist:2659777
Created May 11, 2012 13:49 — forked from icarocamelo/gist:2659726
SQL Lambda Expression
1) Using SQL-like Expression
var iNames = from i in employees
select i.name;
2) Using Lambda Expression
var iNames = employees.Select(r => r.name);
@AlbertoMonteiro
AlbertoMonteiro / gist:2522989
Created April 29, 2012 00:55 — forked from alexsandro-xpt/gist:2522945
Async CTP exemplo 1
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
namespace ConsoleApplication6
{
class Program
{
@AlbertoMonteiro
AlbertoMonteiro / GitForPS1.ps1
Created February 9, 2012 13:16 — forked from AbraaoAlves/GitForPS1.ps1
Git for power shell
#Com git instalado, via powershell:
Set-ExecutionPolicy Unrestricted
if(!$env:path.Contains("C:\Program Files (x86)\Git\cmd"))
{
$env:path += ";C:\Program Files (x86)\Git\cmd"
}
if(!$env:path.Contains("C:\Program Files (x86)\Git\bin"))
{