Skip to content

Instantly share code, notes, and snippets.

View shiftkey's full-sized avatar
🌴
Not checking notifications, for realsies

Brendan Forster shiftkey

🌴
Not checking notifications, for realsies
View GitHub Profile
@shiftkey
shiftkey / git-for-windows-rc.md
Last active October 27, 2015 19:09
Git for Windows - Request for Beta Testers

Git for Windows - Beta Testers Guide

The Git for Windows team is currently testing their newest release candidates, which is a port of Git 2.3 to Windows. As this is a significant change, I've written up a guide for people who are interested in helping to test out things.

Recommended Setup

You can find the latest releases for Git for Windows over on the Releases page:

https://github.com/git-for-windows/git/releases

@shiftkey
shiftkey / SQLitePCL.raw_basic.targets
Created October 29, 2014 03:22
custom build script for SQLitePCL.raw
<?xml version="1.0" encoding="utf-8"?>
<!--Automatically generated-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="check_cpu_0c72a276-f4be-4f0e-bd92-2a1989a25230" BeforeTargets="ResolveAssemblyReferences" Condition=" ( ($(Platform.ToLower()) != 'x86') AND ($(Platform.ToLower()) != 'x64') ) ">
<Warning Text="$(Platform) is not supported. The Platform configuration must be x86 or x64" />
</Target>
<Target Name="InjectReference_87384a6c-0435-42c0-a1fd-2ef989adce4b" BeforeTargets="ResolveAssemblyReferences">
<!--platform.net45.pinvoke_sqlite3.x86-->
<ItemGroup Condition=" '$(Platform.ToLower())' == 'x86' ">
<Reference Include="SQLitePCL.raw">
@shiftkey
shiftkey / talks.md
Last active August 29, 2015 14:07
random talk ideas for dddbrisbane

Git Black Belt Edition

Are you using Git via the command line? Want to learn some tricks or understand more about what Git is actually doing under the hood? This will be mostly live demos, because it's so much more fun to see this stuff in action.

I'd also like to make this session interactive - if you've got questions about Git you'd like to see answered, please file an issue here and I'll see if I can work the best ones into the talk: https://github.com/shiftkey/talks

Asynchronous Programming - Running with Scissors

TODO

@shiftkey
shiftkey / SaveCrashDumps.reg
Created September 18, 2014 22:36
Enable Reporting Crash Dumps for GitHub.exe
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\GitHub.exe]
"DumpType"=dword:00000002
@shiftkey
shiftkey / AsyncTests.cs
Last active August 29, 2015 14:06
implementing a custom awaiter to make Rx more functionally pure
using System;
using System.Reactive;
using System.Reactive.Linq;
using System.Threading.Tasks;
using Xunit;
namespace ClassLibrary3
{
public class AsyncTests
{
@shiftkey
shiftkey / ObservableRepository.cs
Last active December 17, 2020 10:09
five minutes spent mashing together Rx and LibGit2Sharp
using System;
using System.Reactive.Linq;
using LibGit2Sharp;
namespace ReactiveGit
{
public class ObservableRepository : IDisposable
{
readonly Repository _repository;
@shiftkey
shiftkey / list-pull-request-contributors.linq
Created June 4, 2014 14:35
octokit.net list off contributors who have had a pull requests merged into a repository
var client = new GitHubClient(new Octokit.ProductHeaderValue("NDC-Oslo"))
{
Credentials = new Credentials("some-username", "some-password")
};
// find all merged PRs
var filter = new PullRequestRequest() { State = ItemState.Closed };
var pullRequests = await client.Repository.PullRequest.GetForRepository("octokit", "octokit.net", filter);
Console.WriteLine("Pull Requests: " + pullRequests.Count);
@shiftkey
shiftkey / explore.md
Last active July 27, 2022 13:24
WTF happened to my line endings?

This is a quick guide to debug potential line ending weirdness.

Note: I've thrown a lot of concepts in here around Git data structures without going into depth. If there's things that are unclear or you'd like some more details, just leave a comment and I'll either reply or expand on this post accordingly...

What sort of weirdness am I referring to? Consider this commit: https://github.com/dalefrancis88/Windsor/commit/e2543e5573781c7ded83166932c9c415feef11c0

While it looks like a very large commit, the contents of the file are unchanged. But the diffs are very intimidating.

@shiftkey
shiftkey / branching.md
Last active August 29, 2015 13:57
Every Branching Model Is Terrible

It's only been recently that our version control systems have matured to a point where we have the freedom to think about how to collaborate with our colleagues. But we still make mistakes and suffer through bad life decisions. "Bollocks!" you might say.

Well, when was the last time you heard something like this?

  • "Version Control, you say? never heard of it"
  • "uh, what version am I supposed to be working from?"
  • "we don't use branches, they just get in the way"
  • "we're going to gate your checkins and review them"
  • "don't worry about it, just hit that merge button"
@shiftkey
shiftkey / history.md
Last active June 7, 2021 18:59
The cheat sheet for a talk I did on interactive rebase

history what even is it?

git crash course

ProTip: A better git log - https://coderwall.com/p/euwpig

  • commits
    • git show HEAD
    • git rev-list HEAD --parents --max-count 5
    • git rev-list master --parents --max-count 5