Skip to content

Instantly share code, notes, and snippets.

Avatar

Aaron Bockover abock

View GitHub Profile
View PartydonkNumerics.cs
using System;
interface INumeric<TSelf> where TSelf : INumeric<TSelf>
{
TSelf Magnitude { get; }
abstract static TSelf operator *(TSelf a, TSelf b);
}
interface IAdditiveArithmetic<TSelf> : INumeric<TSelf> where TSelf : IAdditiveArithmetic<TSelf>
{
@abock
abock / lathamview.sh
Last active Feb 4, 2020
Timelapse Capture
View lathamview.sh
#!/bin/bash -e
basedir=$1
capturetime="${2:-5}"
ffmpeg="${3:-ffmpeg}"
function usage {
echo "$0 BASEDIR [CAPTURE_TIME [FFMPEG_PATH]]"
exit 1
}
View PrepareVSMacInsertion.ps1
#!/usr/bin/env pwsh
$ErrorActionPreference = "stop"
$targetBranch = "$(Insertion.TargetBranch)"
if (-not $targetBranch) {
$targetBranch = $env:BUILD_SOURCEBRANCHNAME
}
Function _Git
View -
diff --git a/main/external/vs-editor-core b/main/external/vs-editor-core
index de514b321e..47276defe8 160000
--- a/main/external/vs-editor-core
+++ b/main/external/vs-editor-core
@@ -1 +1 @@
-Subproject commit de514b321eb0c941f23e45b2f5a812055df93ebe
+Subproject commit 47276defe80eba388835c6217d111921d06648cd
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/ExceptionCaught/ExceptionCaughtAdornmentManager.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/ExceptionCaught/ExceptionCaughtAdornmentManager.cs
index 9723c2036e..5343baf7ce 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/ExceptionCaught/ExceptionCaughtAdornmentManager.cs
View dontdoit.c
// ██████╗ ██╗ ███████╗ █████╗ ███████╗███████╗ ██████╗ ██████╗ ███╗ ██╗ ██████╗ ████████╗ ███████╗██████╗ ██╗████████╗
// ██╔══██╗██║ ██╔════╝██╔══██╗██╔════╝██╔════╝ ██╔══██╗██╔═══██╗ ████╗ ██║██╔═══██╗╚══██╔══╝ ██╔════╝██╔══██╗██║╚══██╔══╝
// ██████╔╝██║ █████╗ ███████║███████╗█████╗ ██║ ██║██║ ██║ ██╔██╗ ██║██║ ██║ ██║ █████╗ ██║ ██║██║ ██║
// ██╔═══╝ ██║ ██╔══╝ ██╔══██║╚════██║██╔══╝ ██║ ██║██║ ██║ ██║╚██╗██║██║ ██║ ██║ ██╔══╝ ██║ ██║██║ ██║
// ██║ ███████╗███████╗██║ ██║███████║███████╗ ██████╔╝╚██████╔╝ ██║ ╚████║╚██████╔╝ ██║ ███████╗██████╔╝██║ ██║
// ╚═╝ ╚══════╝╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚══════╝╚═════╝ ╚═╝ ╚═╝
//
// █████╗ ██╗ ██╗████████╗ ██████╗ ██████╗ ███████╗███╗ ██╗███████╗██████╗ █████╗ ████████╗███████╗██████╗ ██████
View RuntimeIdentifier.cs
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
using Newtonsoft.Json;
View 0001-slngen.patch
From 7b7e8b679a0b96cc5a09dbd74d73561d932a33b3 Mon Sep 17 00:00:00 2001
From: Aaron Bockover <abock@microsoft.com>
Date: Sun, 25 Mar 2018 13:50:50 -0400
Subject: [PATCH] slngen
---
CoreBuild.proj | 3 +-
build/Xamarin.Build/MSBuild/GenerateSolution.cs | 76 +++++++++++++++++++++++++
2 files changed, 77 insertions(+), 2 deletions(-)
View hackityhack.ts
private layoutAsync() {
// CommandBar will also request an animation frame to do its measure pass;
// set a timeout to defer another loop pass to make sure we run after, and
// then request our own animation frame.
setTimeout(() => window.requestAnimationFrame(this.layout), 0)
}
private layout() {
const commandBar = document.getElementsByClassName('ms-CommandBar')[0]
if (!commandBar)
@abock
abock / guid.cs
Created Apr 13, 2017
A GUID generator written in C# using the scripting mode of `csharp`
View guid.cs
#!/usr/bin/env csharp -s
string error = null;
var showHelp = false;
var count = 1u;
var format = "D";
var upper = false;
var bojangles = false;
for (int i = 0; i < Args.Length && error == null; i++) {
View keybase.md

Keybase proof

I hereby claim:

  • I am abock on github.
  • I am abock (https://keybase.io/abock) on keybase.
  • I have a public key ASBwJHoqJPfxRPdsA8CrwAOxLFPCwUE3MBJkzALIUp3W8go

To claim this, I am signing this object: