Skip to content

Instantly share code, notes, and snippets.

View ernestohs's full-sized avatar
🐙
coding in progress

Ernesto Herrera Salinas ernestohs

🐙
coding in progress
View GitHub Profile
@ernestohs
ernestohs / CleanBin.ps1
Last active August 29, 2015 14:02
I hate when the cached dlls are messing up with my debugging or build process
# Delete all the bin and obj directories from this path
(ls -include bin,obj -Recurse) | foreach ($_) { rm $_.fullname -Force -Recurse }
svn merge -r UPREV:LOWREV .
@ernestohs
ernestohs / gist:cf6f54f4ebe167e4bef0
Created June 17, 2014 19:57
undo single resivision
svn merge -c -REV .
Diff Viewer:
"C:\Program Files (x86)\Beyond Compare 3\BComp.exe" %base %mine /title1=%bname /title2=%yname /leftreadonly
Merge 3 ways:
"C:\Program Files (x86)\Beyond Compare 3\BComp.exe" %mine %theirs %base %merged /title1=%yname /title2=%tname /title3=%bname /title4=%mname
Merge Tool:
"C:\Program Files (x86)\Beyond Compare 3\BComp.exe" %mine %theirs %base %merged /title1=%yname /title2=%tname /title3=%bname /title4=%mname
@ernestohs
ernestohs / FindStr
Created June 18, 2014 01:13
Find String inside a file, then show the full name of this file
Get-ChildItem -recurse | Select-String -pattern "**Wally**" | group path | select name
@ernestohs
ernestohs / ConsumeWCF.ps1
Created June 18, 2014 04:13
Consume WCF form PowerShell
$proxy = Get-WcfProxy 'net.tcp://localhost:8732/EchoService/mex'
'net.tcp://localhost:8732/EchoService/' (New-Object System.ServiceModel.NetTcpBinding)
@ernestohs
ernestohs / .gitconfig
Created June 29, 2014 01:46
Git Alias
[alias]
undo = reset --hard
un = reset --hard
st = status
co = checkout
cm = commit . -m
rollback = checkout --
ignore = update-index --assume-unchanged
i = update-index --assume-unchanged
unignore = update-index --no-assume-unchanged
@ernestohs
ernestohs / findStringInFiles.ps1
Created July 28, 2014 16:31
Search a string in multiple files and return the file names in Powershell
Get-ChildItem -recurse | Select-String -pattern "wally" | group path | select name
# Visual Studio
cinst VisualStudio2013Ultimate
cinst visualstudio2013-update1
cinst visualstudio2013-update2
cinst nunit
cinst resharper
cinst dotCover
cinst dotpeek
cinst VsCommands
@ernestohs
ernestohs / SendMailHtml.ps1
Created February 10, 2015 00:36
PowerShell: Send Email
$from = "Jhon Doe <jhon@doe.com>"
$subject = "This is my subject"
$body = @"
<strong>Cool html content</strong>
"@
$smtpServer = "smtp.server.com"
$user = "smtpuser"
$password = "secretword"