Skip to content

Instantly share code, notes, and snippets.

View jetstreamin's full-sized avatar
:octocat:
chillin' like the vanilla shake that I am

Mike Mahon jetstreamin

:octocat:
chillin' like the vanilla shake that I am
View GitHub Profile
@jetstreamin
jetstreamin / developer-software-install.bat
Last active June 11, 2023 12:38
Server & Developer Machine Software
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco feature enable -n=allowGlobalConfirmation
choco install googlechrome
choco install firefox
choco install brave
choco install greenshot
choco install microsoft-teams
choco install python
choco install octopustools
choco install foxitreader
@jetstreamin
jetstreamin / pinks-purples-color-group.json
Created October 30, 2019 13:57
pinks-purples-color-group
{"pinks-purples-color-group":[
{"name":"pink","code":"#ffc0cb"},
{"name":"lightpink","code":"#ffb6c1"},
{"name":"hotpink","code":"#ff69b4"},
{"name":"deeppink","code":"#ff1493"},
{"name":"palevioletred","code":"#db7093"},
{"name":"mediumvioletred","code":"#c71585"},
{"name":"purpl","code":"colors"},
{"name":"lavender","code":"#e6e6fa"},
{"name":"thistle","code":"#d8bfd8"},
# This script is intentionally kept simple to demonstrate basic automation techniques.
Write-Output "You must run this script in an elevated command shell, using 'Run as Administator'"
$title = "Setup Web Development Environment"
$message = "Select the appropriate option to continue (Absolutely NO WARRANTIES or GUARANTEES are provided):"
$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Install Software using Chocolatey", `
"Setup development environment."
@jetstreamin
jetstreamin / 1585469980.html
Created March 29, 2020 08:19
Created with Copy to Gist
Inbox from the Trump campaign: "America is under attack – not just by an invisible virus, but by the Chinese."
"What is Joe Biden up to as all this is happening? Siding with the Chinese and attacking the presidential candidate China fears most: Donald Trump."
@jetstreamin
jetstreamin / delete-sql.ps1
Last active April 7, 2020 16:28 — forked from develohpanda/delete-sql.ps1
Drop SQL database from Powershell
function Delete-SqlDatabase($serverName, $databaseName) {
Import-Module SQLPS
$server = New-Object Microsoft.SqlServer.Management.Smo.Server($serverName)
$db = $server.databases[$databaseName]
if ($db) {
$server.KillAllprocesses($databaseName)
$db.Drop()
}
}
@jetstreamin
jetstreamin / WeightedRandomSelectionWithLimitedAllocations.cs
Created April 7, 2020 16:33 — forked from develohpanda/WeightedRandomSelectionWithLimitedAllocations.cs
Weighted Random Selection With Limited Allocations - a modified implementation of the solution found at http://programmers.stackexchange.com/a/150642/244423
/// <summary>
/// Selects a random element from input list using the allocations remaining to sway selection
/// T must have AllocationRemaining, Weight and Id properties on it.
/// </summary>
public T SelectRandom<T>(List<T> objects)
{
int totalWeight = 0;
T selected = default(T);
foreach (T obj in objects)
{
@jetstreamin
jetstreamin / WeightedRandomSelection.cs
Created April 7, 2020 16:34 — forked from develohpanda/WeightedRandomSelection.cs
Weighted Random Selection - a simplified implementation of the solution found at http://programmers.stackexchange.com/a/150642/244423
/// <summary>
/// Selects a random element from input list using the weights on T to sway selection.
/// T must have a Weight property on it.
/// </summary>
public T SelectRandom<T>(List<T> objects)
{
int totalWeight = 0;
T selected = default(T);
foreach (T obj in objects)
{
@jetstreamin
jetstreamin / bounce-db.ps1
Created April 15, 2020 14:01
bounce-db.ps1 - stops sql server services and deletes the mdf/ldf
Import-Module SQLPS
$server = New-Object Microsoft.SqlServer.Management.Smo.Server("localhost")
$db = $server.databases["YOURDBNAME"]
if ($db) {
$server.KillAllprocesses("YOURDBNAME")
$db.Drop()
}
@jetstreamin
jetstreamin / System Design.md
Created May 17, 2020 10:14 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?

Keybase proof

I hereby claim:

  • I am jetstreamin on github.
  • I am dysk0n3kt (https://keybase.io/dysk0n3kt) on keybase.
  • I have a public key ASAx8H2rgt-74CDv7SGAuwcWvbA67ooI0WNLhIl6_UHMPwo

To claim this, I am signing this object: