Skip to content

Instantly share code, notes, and snippets.

View abock's full-sized avatar

Aaron Bockover abock

View GitHub Profile
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 February 4, 2020 17:45
Timelapse Capture
#!/bin/bash -e
basedir=$1
capturetime="${2:-5}"
ffmpeg="${3:-ffmpeg}"
function usage {
echo "$0 BASEDIR [CAPTURE_TIME [FFMPEG_PATH]]"
exit 1
}
#!/usr/bin/env pwsh
$ErrorActionPreference = "stop"
$targetBranch = "$(Insertion.TargetBranch)"
if (-not $targetBranch) {
$targetBranch = $env:BUILD_SOURCEBRANCHNAME
}
Function _Git
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
@abock
abock / dontdoit.c
Created August 10, 2018 15:45
DO NOT EDIT
// ██████╗ ██╗ ███████╗ █████╗ ███████╗███████╗ ██████╗ ██████╗ ███╗ ██╗ ██████╗ ████████╗ ███████╗██████╗ ██╗████████╗
// ██╔══██╗██║ ██╔════╝██╔══██╗██╔════╝██╔════╝ ██╔══██╗██╔═══██╗ ████╗ ██║██╔═══██╗╚══██╔══╝ ██╔════╝██╔══██╗██║╚══██╔══╝
// ██████╔╝██║ █████╗ ███████║███████╗█████╗ ██║ ██║██║ ██║ ██╔██╗ ██║██║ ██║ ██║ █████╗ ██║ ██║██║ ██║
// ██╔═══╝ ██║ ██╔══╝ ██╔══██║╚════██║██╔══╝ ██║ ██║██║ ██║ ██║╚██╗██║██║ ██║ ██║ ██╔══╝ ██║ ██║██║ ██║
// ██║ ███████╗███████╗██║ ██║███████║███████╗ ██████╔╝╚██████╔╝ ██║ ╚████║╚██████╔╝ ██║ ███████╗██████╔╝██║ ██║
// ╚═╝ ╚══════╝╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚══════╝╚═════╝ ╚═╝ ╚═╝
//
// █████╗ ██╗ ██╗████████╗ ██████╗ ██████╗ ███████╗███╗ ██╗███████╗██████╗ █████╗ ████████╗███████╗██████╗ ██████
// 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;
From 7b7e8b679a0b96cc5a09dbd74d73561d932a33b3 Mon Sep 17 00:00:00 2001
From: Aaron Bockover <[email protected]>
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(-)
@abock
abock / hackityhack.ts
Created March 9, 2018 18:02
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 April 13, 2017 14:28
A GUID generator written in C# using the scripting mode of `csharp`
#!/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++) {

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: