Skip to content

Instantly share code, notes, and snippets.

View dahlbyk's full-sized avatar

Keith Dahlby dahlbyk

View GitHub Profile
$GitInstallDir = 'C:\Program Files (x86)\Git'
$Env:HOME = $Env:USERPROFILE
$Env:PLINK_PROTOCOL = 'ssh'
$Env:Path = "$GitInstallDir\bin;$GitInstallDir\mingw\bin;$Env:Path"
Set-Alias gitk "$GitInstallDir\cmd\gitk.cmd"
. C:\Dev\OSS\posh-git\profile.example.ps1
@dahlbyk
dahlbyk / .gitconfig
Created March 1, 2012 14:29
Windows Git Diff/Merge Tool Configuration
[alias]
dt = difftool
mt = mergetool
[diff]
tool = bc3
[difftool]
prompt = false
[difftool "bc3"]
cmd = \"c:/program files (x86)/beyond compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\"
[difftool "p4"]
@dahlbyk
dahlbyk / gist:5474986
Last active December 16, 2015 18:08
Git AMA from Twin Cities Code Camp, Apr 27, 2013

Keith Dahlby

@dahlbyk

  1. Philosophically, why is Git more than a Subversion killer?
  2. Should we switch from Mercurial?
  3. How does GitHub work?
  4. Is there a good distro to host a private repository (Linux)?
  5. Where to host/backup?
  • Gitolite
@dahlbyk
dahlbyk / gist:6399709
Created August 31, 2013 17:59
Clarifying the D in SOLID...

Dependency Inversion Principle says do this:

class Foo
{
    IBar bar;

    public Foo(IBar bar) {
        this.bar = bar;
 }
open System;
open System.Diagnostics;
[<EntryPoint>]
let main argv =
let rec cc amount coins =
match (amount, coins) with
| (0,_) -> 1
| (_,[]) -> 0
| (amount,_) when amount < 0 -> 0
@dahlbyk
dahlbyk / gist:a8c63276536b94c463a7
Created November 1, 2014 21:58
Midwest Community Opportunities
Conferences
===========
Heartland Developer Conference in Omaha ~ September
Kansas City Developer Conf ~ June says Darin
St Louis Days of .NET ~ Nov (in two weeks, smart ass - thanks, seriously. you're the best)
Nebraska Code Camp ~ April (...)
Twin Cities Code Camp ~ April / October
Iowa Code Camp ~ "Spring" in summer (June last year, July this year), and Novemberish
That Conference ~ August (HIIIIIIGHLY recommended - Kalahari water park, BACON BAR)
Norweigian Developer Conference ~ June (a maz ing)
@dahlbyk
dahlbyk / demo.gitconfig
Created November 24, 2014 06:22
Git Demo Aliases
# To start a demo between <start-ref> and <end-ref> (default = HEAD):
# git demo <start-ref> [<end-ref>]
# To step through commits toward <end-ref>:
# git next
[alias]
demo = !sh -c 'git update-ref DEMO_HEAD $(git rev-parse ${2-HEAD}) && git checkout -fq $1~0' -
next = !sh -c 'git checkout -fq $(git log ..DEMO_HEAD --pretty=format:"%H" | tail -n1)' -
PS>git init test
Initialized empty Git repository in C:/temp/test/.git/
>
PS>cd test
>
PS>git commit --allow-empty -m test
[master (root-commit) 33f14f7] test
>
@dahlbyk
dahlbyk / github-timeline-events-comparison.md
Last active July 3, 2024 07:19
GitHub API Comparison: Issue Events vs Issue Timeline
[alias]
co = checkout
# New branch
nb = checkout origin -b
# Push new branch
pnb = push -u origin HEAD
# Log Graph