Skip to content

Instantly share code, notes, and snippets.

View JustinianErdmier's full-sized avatar
🦄
Running code is my cardio

Justinian Erdmier JustinianErdmier

🦄
Running code is my cardio
View GitHub Profile
@JustinianErdmier
JustinianErdmier / terminal-config-v1.omp.json
Created October 14, 2025 09:25
Oh My Posh Terminal Config V1
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"properties": {
"cache_duration": "none",
@JustinianErdmier
JustinianErdmier / ConnectionString.json
Created August 30, 2023 15:07
Local MSSQL DB Connection String
{
"ConnectionString": "Data Source=(localdb)\\MSSQLLocalDB;Database={DbName};Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"
}
@JustinianErdmier
JustinianErdmier / modelBinder.php
Created August 3, 2022 21:49
A WIP implementation of hydrating a model with data.
/**
* Provides a very rudimentary way of binding the data in {@see ControllerBase::$body} to a provided model.
*
* At this time, the desired model to be hydrated must meet the following criteria:
* - Constructor must be parameterless (including no promoted properties).
* - All property types must be simple, built-in types (e.g., string, int, bool).
*
* @param string $classFQN The fully qualified name of the desired model (i.e., MyClassName::class).
*
* @return object|null The hydrated model given no fatal errors, null otherwise.
// Backup
docker exec dockerContainer sh -c 'exec mysqldump --all-databases -uroot -p"$MYSQL_ROOT_PASSWORD"' > C:\path\to\dump.sql
docker exec dockerContainer sh -c 'exec mysqldump --databases databaseSchemaName -uroot -p"$MYSQL_ROOT_PASSWORD"' > C:\path\to\dump.sql
// Restore
docker exec -i dockerContainer sh -c 'exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD"' > C:\path\to\dump.sql
@JustinianErdmier
JustinianErdmier / index.html
Created March 1, 2022 21:09
An imperative way of using JavaScript to create and modify HTML elements.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<div id="root"></div>
@JustinianErdmier
JustinianErdmier / Microsoft.PowerShell_profile.ps1
Last active October 14, 2025 10:03
A comprehensive PowerShell profile which includes some keybindings from Visual Studio and quality-of-life toolings like PSReadLine. Largely inspired by and based on the work of Scott Hanselman.
#Install-Module PSReadLine -Repository PSGallery -Scope CurrentUser -Force
#Install-Module posh-git -Scope CurrentUser -Force
#Install-Module -Name Terminal-Icons -Scope CurrentUser -Force
#dotnet tool install dotnet-suggest --global or dotnet tool update dotnet-suggest --global
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
Import-Module posh-git
@JustinianErdmier
JustinianErdmier / terminal-posh-theme-v4.json
Last active October 10, 2025 21:23
A custom theme for styling my Windows Terminal, mainly PowerShell. Original theme named clean-detailed.omp.json and provided by Oh My Posh. Modifications largely inspired by Scott Hanselman.
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"transient_prompt": {
"template": "\ue285 ",
"foreground": "#FEF5ED",
"background": "transparent"
},
"console_title_template": "{{ .Folder }}",
"blocks": [
{