Skip to content

Instantly share code, notes, and snippets.

Working from home, in Australia.

David Wengier davidwengier

Working from home, in Australia.
View GitHub Profile
View HiDarran.cs
using System;
using System.Threading.Tasks;
using SkiaSharp;
using SkiaSharp.Views.Desktop;
namespace HiDarran
public partial class HiDarran : System.Windows.Forms.Form
private readonly SKControl skView;
View digitaldias's software.cs
using System;
namespace ConsoleApp35
class Program
private static ExceptionHandler _exceptionHandler = new ExceptionHandler();
static async void Main(string[] args)
var result = _exceptionHandler.With(() => someEvilShit())
davidwengier / toggle_title_bar.ahk
Created August 25, 2020 06:18
AutoHotKey Script to toggle window title bars
View toggle_title_bar.ahk
LWIN & LButton::
WinSet, Style, -0xC00000, A
WinSet, Style, -0x40000, A
LWIN & RButton::
WinSet, Style, +0xC00000, A
View InterpolatedStrings.cs
using BenchmarkDotNet.Attributes;
namespace BenchmarkCore
public class InterpolatedStrings
public string IntToString()
View TimeFormatting.cs
using System;
using System.Text;
using BenchmarkDotNet.Attributes;
namespace BenchmarkFull
// @Lyrcaxis on the C# discord asked for help improving the string interpolation code below, and someone dared suggest that string.Concat wasn't good
// and I couldn't let that rest!
View FizzBuzz.fs
let is divisor outputString n result =
if n % divisor = 0 then
Some ( (result |> Option.defaultValue("")) + outputString)
else if result.IsSome then
let fizz x s = is 3 "fizz" x s

Keybase proof

I hereby claim:

  • I am davidwengier on github.
  • I am ch00k ( on keybase.
  • I have a public key whose fingerprint is 7925 6C7D 90F4 8AF6 74E8 7AE9 506B 43FC CD89 AD33

To claim this, I am signing this object:

View date.m
NSDate *today = [NSDate date];
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"dd MMM yyyy"];
[dateFormat setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"GMT"]];
NSString *dateString = [dateFormat stringFromDate:today];
[dateFormat release];