Skip to content

Instantly share code, notes, and snippets.

@tom-auger
tom-auger / gwtmerge.zsh
Last active April 18, 2026 12:00
Updates a branch (including across worktrees), rebases it onto a base branch (default main), and merges it into the current branch using fast-forward or squash based on commit count.
# gwtmerge <branch> [base-branch]
#
# Purpose:
# Updates a target branch, rebases it onto a base branch, and merges it into
# the current branch, handling git worktrees when the target branch is checked
# out elsewhere.
#
# Syntax:
# gwtmerge <branch> [base-branch]
#
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@tom-auger
tom-auger / noscript-tracking.go
Created May 11, 2019 21:30 — forked from wybiral/noscript-tracking.go
Tracking cursor position in real-time with remote monitoring (without JavaScript)
// Tracking cursor position in real-time without JavaScript
// Demo: https://twitter.com/davywtf/status/1124146339259002881
package main
import (
"fmt"
"net/http"
"strings"
)
@tom-auger
tom-auger / PowerShell Customization.md
Created February 25, 2018 21:25 — forked from jchandra74/PowerShell Customization.md
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

Keybase proof

I hereby claim:

  • I am tom-auger on github.
  • I am tomauger (https://keybase.io/tomauger) on keybase.
  • I have a public key ASCicl_cDAs8a8eFgJ3zLfmG112Ef-igzISefq5u6uEdYQo

To claim this, I am signing this object:

@tom-auger
tom-auger / howto-recover-google-authenticator-keys.txt
Created February 19, 2018 08:09 — forked from jbinto/howto-recover-google-authenticator-keys.txt
Recovering Google Authenticator keys from Android device for backup
### Last tested February 7 2014 on a Galaxy S3 (d2att) running Cyanogenmod 11 nightly, with Google Authenticator 2.49.
### Device with Google Authenticator must have root.
### Computer requires Android Developer Tools and SQLite 3.
### Connect your device in USB debugging mode.
$ cd /tmp
$ adb root
$ adb pull /data/data/com.google.android.apps.authenticator2/databases/databases
@tom-auger
tom-auger / monadster.fsx
Created January 23, 2018 18:09 — forked from swlaschin/monadster.fsx
F# scripts demonstrating a custom state monad. Related blog post: http://fsharpforfunandprofit.com/posts/monadster/
(*
monadster.fsx
Demonstrates how the state monad works
See also monadster2.fsx for the refactored version using computation expressions.
Related blog post: http://fsharpforfunandprofit.com/posts/monadster/
*)