Skip to content

Instantly share code, notes, and snippets.

View pedroreys's full-sized avatar

Pedro Reys pedroreys

View GitHub Profile
@pedroreys
pedroreys / .gitconfig
Created February 5, 2014 21:47
Configuring git to use p4merge on Windows
[merge]
tool = p4merge
[mergetool "p4merge"]
path = c:/Program Files/Perforce/p4merge.exe
cmd = \"c:/Program Files/Perforce/p4merge.exe\" \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
[RoutePrefix("api/assemble/wip")]
public class AssembleWipItemController : ApiController
{
private readonly IMediator _mediator;
public AssembleWipItemController(IMediator mediator)
{
_mediator = mediator;
}
@pedroreys
pedroreys / gulpfile.js
Created September 3, 2014 23:31
Appending multiple src streams in a gulp task
var streamqueue = require('streamqueue');
gulp.task('zipit', ['clean', 'less'], function () {
var stream = streamqueue({objectMode: true});
stream.queue(
gulp.src(['**', '!./protobuffer/**', '!./node_modules/**', '!./archive/**', '!./.idea/**', '!./db/**', '!./docs/**', '!./logs/**'], {base: "."})
);
. 2010-09-30 17:12:20.636 --------------------------------------------------------------------------
. 2010-09-30 17:12:20.636 WinSCP Version 4.2.9 (Build 938) (OS 6.1.7600)
. 2010-09-30 17:12:20.636 Login time: Thursday, September 30, 2010 5:12:20 PM
. 2010-09-30 17:12:20.637 --------------------------------------------------------------------------
. 2010-09-30 17:12:20.637 Session name:
. 2010-09-30 17:12:20.637 Host name: (Port: 22)
. 2010-09-30 17:12:20.637 User name: (Password: Yes, Key file: No)
. 2010-09-30 17:12:20.638 Tunnel: No
. 2010-09-30 17:12:20.638 Transfer Protocol: SFTP (SCP)
. 2010-09-30 17:12:20.638 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
public class Foo
{
private IContainer _container;
public Foo(IContainer container)
{
_container = container;
}
public Bar()
{
@pedroreys
pedroreys / gist:834651
Created February 19, 2011 00:09
Convention needed when database column datatype is Image
public class ImageLengthConvention : IPropertyConvention, IPropertyConventionAcceptance
{
public void Accept(IAcceptanceCriteria<IPropertyInspector> criteria)
{
criteria.Expect(x => x.Property.PropertyType == typeof (byte[]));
}
public void Apply(IPropertyInstance instance)
{
instance.Length(2147483647);
[Environment]::SetEnvironmentVariable("PATH",your_path,"Machine")
@pedroreys
pedroreys / certificados, certificados
Created March 15, 2011 20:40
Vai bem a indústria de certificados
1. ANALISTA DE GOVERNANÇA DE TI
Quantidade: 3
Qualificação Técnico-Profissional
Requisitos Obrigatórios:
Possuir curso superior completo;
Possuir ao menos 10 (dez) anos de experiência em TI;
Possuir a certificação ITIL V2 ou V3, nível Foundation;
Possuir a certificação COBIT Foundation.
2. ARQUITETO SOA
@pedroreys
pedroreys / gist:957776
Created May 5, 2011 19:54
Encoraging commit message
"Hack Attack! - Finally got the Tab Ordering working per specs , but it's hacky as heck :( There must be a PhD program offered in handling Winform events and tab ordering somewhere... I may need to enroll in it."
And now I have to fix it. :(
@pedroreys
pedroreys / gist:1097464
Created July 21, 2011 15:43
AutoMapper Example
var contacts = new List<Dto>();
foreach(Employee employee in Employees)
{
Dto contact = new Mapper.Map<Employee, Dto>(employee);
contacts.Add(contact);
}