Skip to content

Instantly share code, notes, and snippets.

Avatar
🏡
On holidays, not checking notifications

Brendan Forster shiftkey

🏡
On holidays, not checking notifications
View GitHub Profile
@shiftkey
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
shiftkey / explore.md
Last active Feb 5, 2020
WTF happened to my line endings?
View explore.md

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 / history.md
Last active Nov 11, 2019
The cheat sheet for a talk I did on interactive rebase
View history.md

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 / output.md
Last active Jun 4, 2019
latest build output of github/semantic on WSL
View output.md
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
View 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 / lipsum.md
Created Dec 31, 2018
new file to trigger "too large" warning inside GitHub Desktop
View lipsum.md

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 / 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
shiftkey / cliff-notes.md
Last active Jul 28, 2018
Working Distributed - Cliff Notes
View cliff-notes.md
@shiftkey
shiftkey / magic.md
Created Jan 9, 2014
Git: reverting a revert using the reflog
View magic.md

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
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 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) {
You can’t perform that action at this time.