Skip to content

Instantly share code, notes, and snippets.

@RoryBecker
RoryBecker / .bash_profile
Created November 23, 2011 21:24
My .bash_profile
#-------------------------------------------------------------
# Git - My bash profile (aliases)
#-------------------------------------------------------------
#The Basics
alias status='git status'
alias add='git add -A .'
alias commit='git commit'
alias help='git help'
@RoryBecker
RoryBecker / profile.example.ps1
Created February 20, 2012 16:31
My Posh-git Profile
Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)
# Load posh-git module from current directory
Import-Module .\posh-git
$GitPromptSettings.EnableFileStatus = $false
# If module is installed in a default location ($env:PSModulePath),
# use this instead (see about_Modules for more information):
# Import-Module posh-git
@RoryBecker
RoryBecker / NLog.Config
Created February 29, 2012 10:17
Sample NLog configuration
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="console" xsi:type="Console" />
<target name="file" xsi:type="File" fileName="${basedir}/log.txt" />
<target name="email" xsi:type="Mail"
smtpServer="smtp.DomainName.com"
smtpAuthentication="Basic"
@RoryBecker
RoryBecker / gist:1953237
Created March 1, 2012 21:07
git repo creation
#-------------------------------------------------------------
# git repo creation
#-------------------------------------------------------------
#Create new 'empty' repo in the current folder.
git init
#Create new 'empty' repo with no working folder component.
# - Suitable for a central repo model
git init --bare
@RoryBecker
RoryBecker / gist:2157417
Created March 22, 2012 09:51
NLog Infio vs Other
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="InfoFile" xsi:type="File" fileName="${basedir}/Info.txt" />
<target name="OtherFile" xsi:type="File" fileName="${basedir}/Other.txt" />
</targets>
<rules>
<logger name="*" levels="Info" writeTo="InfoFile" />
@RoryBecker
RoryBecker / gist:2292285
Created April 3, 2012 14:09
Git Remotes (Adding and Removeing)
#-------------------------------------------------------------
# Git Remotes (Adding and removing)
#-------------------------------------------------------------
#Add a file share remote
git remote add <remoteName> //MyServer/SomeShare/RestOfPath[.git]
#Add a bitbucket remote
git remote add <remoteName> git@bitbucket.org:[username]/[RepoName].git
@RoryBecker
RoryBecker / gist:2292865
Created April 3, 2012 15:18
Git (Pushing and Pulling)
#-------------------------------------------------------------
# Git - Pushing and Pulling
#-------------------------------------------------------------
#fetch all changes from a remote (Does not merge any changes with your local repo)
git fetch <RemoteName>
# Pull specific branch from a named remote
git pull <RemoteName> <Branch>
@RoryBecker
RoryBecker / gist:2375184
Created April 13, 2012 08:49
Found this comment in my code
' Ok now pay attention because this is already confusing enough.
' Have you already had your coffee?
' No? Well go and get one. You're going to need it...
public interface IMyComplete
{
// generated gubbins
void DoWork();
//manual gubbins
void DoWorkImpl();
}
// generated class
@RoryBecker
RoryBecker / EII.vb
Created May 21, 2012 20:43
Explicit interface implementation
Public Interface ISomeInterface
Sub Method1()
Sub Method2()
Sub Method3()
End Interface
Public MustInherit Class GrandParentExplicit
Implements ISomeInterface
Public Sub Method1() Implements ISomeInterface.Method1