Skip to content

Instantly share code, notes, and snippets.

On holidays, not checking notifications

Brendan Forster shiftkey

On holidays, not checking notifications
View GitHub Profile
shiftkey / Shimmer.txt
Last active Jul 1, 2020
Example Logging from Shimmer
View Shimmer.txt
2013-08-22 | 08:11:11 PM +10 | INFO | App: Bootstrapper started
2013-08-22 | 08:11:14 PM +10 | WARN | POCOObservableForProperty: Shimmer.WiXUi.Views.WelcomeView is a POCO type and won't send change notifications, WhenAny will only return a single value!
2013-08-22 | 08:11:14 PM +10 | WARN | POCOObservableForProperty: NuGet.ZipPackage is a POCO type and won't send change notifications, WhenAny will only return a single value!
2013-08-22 | 08:11:15 PM +10 | WARN | POCOObservableForProperty: Shimmer.WiXUi.Views.InstallingView is a POCO type and won't send change notifications, WhenAny will only return a single value!
2013-08-22 | 08:11:16 PM +10 | INFO | App: Bootstrapper finishing
2013-08-22 | 08:11:32 PM +10 | INFO | App: Bootstrapper started
2013-08-22 | 08:11:34 PM +10 | INFO | App: Bootstrapper finishing
shiftkey /
Last active Feb 5, 2020
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:

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

shiftkey /
Last active Nov 11, 2019
The cheat sheet for a talk I did on interactive rebase

history what even is it?

git crash course

ProTip: A better git log -

  • commits
    • git show HEAD
    • git rev-list HEAD --parents --max-count 5
    • git rev-list master --parents --max-count 5
shiftkey /
Last active Jun 4, 2019
latest build output of github/semantic on WSL
shiftkey@perfectly-mediocre:~/src/semantic$ cat /etc/lsb-release

shiftkey@perfectly-mediocre:~/src/semantic$ cabal -V
cabal-install version
compiled using version of the Cabal library

Keybase proof

I hereby claim:

  • I am shiftkey on github.
  • I am shiftkey ( on keybase.
  • I have a public key ASDmd1m3Cn2xb5L97wxA5O338UyHWeulLdG3-S2FYIXNQAo

To claim this, I am signing this object:

shiftkey /
Created Dec 31, 2018
new file to trigger "too large" warning inside GitHub Desktop

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ut tincidunt felis, et viverra mauris. Suspendisse eu tellus nec lorem ornare facilisis. Integer euismod volutpat elit a faucibus. Vestibulum tellus justo, congue at sapien id, semper sagittis neque. Proin ornare nisl eu quam molestie, sed tempor quam viverra. Cras scelerisque, est in mattis ultricies, dui leo laoreet turpis, et mattis arcu nunc ac est. Etiam id dolor et ligula interdum mattis. Nullam purus urna, porttitor in varius quis, rutrum ac purus. Ut metus tellus, aliquam eu eros a, venenatis congue tellus. Nullam id enim ut ipsum ultrices auctor.

Duis tristique in nisi non laoreet. Nullam et velit nulla. Aliquam erat volutpat. Praesent vitae auctor purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus volutpat, velit sed sagittis egestas, nulla nisl consequat metus, luctus elementum tellus ex vitae ante. Donec augue lectus, condimentum nec dui eget, tristique imperdiet risus. Intege

shiftkey / test.ps1
Created Feb 10, 2013
Sorting code files by line count using Powershell (because I want to tackle the simplest ones first)
View test.ps1
$sortedFiles = @()
$files = Get-ChildItem D:\Code\github\shiftkey\UbiqRT-Storage\Storage\ -Filter *.cs -Recurse
ForEach($file in $files) {
$count = (Get-Content $file.FullName | Measure-Object).Count
if ($count -gt 0) {
$fullName =
$obj = New-Object System.Object
shiftkey /
Last active Jul 28, 2018
Working Distributed - Cliff Notes
shiftkey /
Created Jan 9, 2014
Git: reverting a revert using the reflog

Recovering from a bad revert

Open up Git Shell for your repository and type this command:

git reflog

This will show a list of recent actions that Git has performed against your repository:

shiftkey / field-input.js
Created Jul 25, 2017
[react] a workaround for the caret position being reset after updating the value
View field-input.js
// source: @aliaksandr-master at
// documenting it here in case it gets edited or disappeared from the issue
const FieldInput = class FieldInput extends Component {
static propTypes = {
onChange: PropTypes.func,
value: PropTypes.oneOfType([ PropTypes.number, PropTypes.string ])
constructor (...args) {
You can’t perform that action at this time.