Skip to content

Instantly share code, notes, and snippets.

@rumdood
rumdood / connect.ps1
Last active May 31, 2023 23:49 — forked from codebykyle/connect.ps1
Windows Terminal Split Pane Powershell Script - v2
using namespace System.Collections.Generic
# Encapsulate an arbitrary command
class PaneCommand {
[string]$Command
PaneCommand() {
$this.Command = "";
}
@rumdood
rumdood / rumdood.omp.json
Created February 6, 2023 17:45
Personal OhMyPosh Theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#979729",
"foreground": "#000000",
"powerline_symbol": "\ue0c4",
@rumdood
rumdood / Microsoft.Powershell_profile.ps1
Last active March 14, 2023 22:52
Personal Workstation PWSH Profile
# Requires -Version 7
# Version 2.0.0
# check if newer version
#$gistUrl = "https://gist.github.com/rumdood/88a56918088a939f3c08f32ab2bbfe74"
#$latestVersionFile = [System.IO.Path]::Combine("$HOME",'.latest_profile_version')
#$versionRegEx = "# Version (?<version>\d+\.\d+\.\d+)"
#if ([System.IO.File]::Exists($latestVersionFile)) {
# $latestVersion = [System.IO.File]::ReadAllText($latestVersionFile)
@rumdood
rumdood / dasblog-readme-proposed.md
Last active March 12, 2022 00:22
Proposed DasBlog Readme including Deploy To Azure button

Deploy to Azure Button

1. Click the Deploy To Azure Button

Deploy to Azure

  • Choose your Azure Subscription
  • Choose or create a Resource Group
  • Choose a Region
  • Choose A Unique Site Name
  • SKU and Worker Size default to the recommended values for production
@rumdood
rumdood / cassiboggle.cs
Last active February 13, 2022 05:10
Boggle Word Search Mask
/*
SAMPLE OUTPUT:
Welcome to Cassiboggle
Here is your board:
a a q t
x c w e
r l e p
@rumdood
rumdood / NonSequentialElementsTests.cs
Last active January 22, 2022 07:25
Non-Sequential Sum: Find the highest possible sum of elements in an array where the elements in the sum are non-adjacent (e.g. [1, 2, 3] yields [1, 3] or a sum of 4
using Xunit;
using System.Collections.Generic;
using System;
using System.Linq;
namespace ST;
public class NonSequentialSumTest
{
[Theory]
@rumdood
rumdood / Instructions.md
Last active September 16, 2021 18:59 — forked from NickCraver/Microsoft.PowerShell_profile.ps1
RumDood's oh-my-posh profile

Included here are the PowerShell profile I forked from Nick Craver, god among coders, as well as the oh-my-posh 3 config, but in addition to these you'll need:

  1. The PowerShell modules:
    • For git in PowerShell, I use posh-git
    • For prompt customization, I use oh-my-posh
    • For file/folder icons I use the excellent Terminal-Icons package by @devblackops: https://github.com/devblackops/Terminal-Icons
    • To install each:
Install-Module -Name posh-git -Repository PSGallery
Install-Module -Name oh-my-posh -Repository PSGallery
/*
* source: https://www.red-gate.com/simple-talk/sql/database-administration/using-migration-scripts-in-database-deployments/
*/
-- does a particular procedure exist
IF EXISTS ( SELECT 1
FROM information_schema.Routines
WHERE ROUTINE_NAME = 'MyProcedureName'--name of procedire
AND ROUTINE_TYPE = 'PROCEDURE'--for a function --'FUNCTION'
AND ROUTINE_SCHEMA = 'DBO' )

Ingredients

  • 2 cloves garlic, minced
  • 1 clove garlic, whole
  • 1 tsp ground cumin
  • 1 tsp cumin seeds
  • 1 tsp cayenne pepper
  • 1 tsp salt
  • 1 Tbs olive oil
  • 1 bay leaf
  • 4 shallots, diced
Disable-UAC
# --------------- Update Windows Settings ---------------
Set-ExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
Disable-BingSearch
Disable-GameBarTips
choco install Microsoft-Windows-Subsystem-Linux -source windowsfeatures