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 / Shimmer.txt
Last active March 4, 2024 21:33
Example Logging from Shimmer
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
shiftkey / field-input.js
Created July 25, 2017 19:13
[react] a workaround for the caret position being reset after updating the value
// source: @aliaksandr-master at https://github.com/facebook/react/issues/955#issuecomment-316118969
// 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) {
@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 / lipsum.md
Created December 31, 2018 15:15
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
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
@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 / output.md
Last active June 4, 2019 19:55
latest build output of github/semantic on WSL
shiftkey@perfectly-mediocre:~/src/semantic$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"

shiftkey@perfectly-mediocre:~/src/semantic$ cabal -V
cabal-install version 2.4.1.0
compiled using version 2.4.1.0 of the Cabal library
@shiftkey
shiftkey / keybase.md
Created May 10, 2019 23:20
keybase.md

Keybase proof

I hereby claim:

  • I am shiftkey on github.
  • I am shiftkey (https://keybase.io/shiftkey) on keybase.
  • I have a public key ASDmd1m3Cn2xb5L97wxA5O338UyHWeulLdG3-S2FYIXNQAo

To claim this, I am signing this object:

@shiftkey
shiftkey / test.ps1
Created February 10, 2013 09:41
Sorting code files by line count using Powershell (because I want to tackle the simplest ones first)
$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
shiftkey / cliff-notes.md
Last active July 28, 2018 22:20
Working Distributed - Cliff Notes