Skip to content

Instantly share code, notes, and snippets.

View KyleMit's full-sized avatar

Kyle Mitofsky KyleMit

View GitHub Profile
@KyleMit
KyleMit / birthday.js
Last active April 9, 2024 12:27
Birthday Prize Simulation
main()
function main() {
var prizes = [-1, -1, -1, 1, 1, 2, 2, 2, 3, 3, 5, 5, 5, 5, 5, 20, 20, 20, 20, 20, 20, 40, 40, 40, 60, 100];
var simulationResults = Array.from({ length: prizes.length }, (_, i) => simulateTurns(prizes, i + 1));
console.log(simulationResults);
}
function simulateTurns(prizes, selectionCount = 15, turns = 10000) {
let winningsForAllTurns = Array.from({ length: turns }, () => simulateGame(prizes, selectionCount));
@KyleMit
KyleMit / archive.ps1
Last active February 25, 2024 14:25
Execute Powershell Script on Right Click in Windows Explorer
$path = $args[0]
Add-Type -AssemblyName PresentationFramework
[System.Windows.MessageBox]::Show("Hello $path")

Instructor:

  • David Kearns, MBA, PMP, ACP
  • Working on VT Health Connect

Logistics

  • Start/Stop
  • Homework
    • 16 Page Scrum white paper
@KyleMit
KyleMit / Program.cs
Created March 5, 2023 16:58
Performance Benchmarks for Testing [a-Z]
using System;
using System.Linq;
using System.Text.RegularExpressions;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Running;
BenchmarkRunner.Run<TestAlphaCheck>();
@KyleMit
KyleMit / HomeController.cs
Last active February 2, 2023 00:26
Heartbeat to Keep Session Alive in ASP.NET MVC
[HttpPost]
public JsonResult KeepSessionAlive()
{
return new JsonResult {Data = "Success"};
}
@KyleMit
KyleMit / cloudSettings
Last active November 26, 2022 21:24
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-04-12T13:23:41.875Z","extensionVersion":"v3.4.3"}

Rebasing a branch of a branch after squash merging

Here's a question I asked on slack recently:

When we do a branch off a branch,
and then squash commit the original,
is there a way to get the original commits to not show up on the new PR?

It's a a scenario that comes up not infrequently...

@KyleMit
KyleMit / index.html
Last active July 26, 2022 08:23
Walker's Algorithm
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">
<title>Walkers</title>
</head>
<body>
<header>
@KyleMit
KyleMit / rename-main.md
Created February 18, 2022 21:44
Rename Default Branch to Main
@KyleMit
KyleMit / listener-jQuery.js
Created October 15, 2020 19:54
Twitter - Delegated Listener
$("body").on("click", ".rectangle", function(e) {
console.log("jquery", this)
// do stuff
});