Skip to content

Instantly share code, notes, and snippets.

View MovGP0's full-sized avatar
:octocat:

Johann Dirry MovGP0

:octocat:
View GitHub Profile
@MovGP0
MovGP0 / Install-NerdFonts.ps1
Last active June 18, 2025 12:34
Installation script for all NerdFonts
# Define all available Nerd Fonts
$fonts = @(
'0xProto', '3270', 'Agave', 'AnonymousPro', 'Arimo', 'AurulentSansMono',
'BigBlueTerminal', 'BitstreamVeraSansMono', 'CascadiaCode', 'CodeNewRoman',
'ComicShannsMono', 'Cousine', 'DaddyTimeMono', 'DejaVuSansMono',
'DroidSansMono', 'EnvyCodeR', 'FantasqueSansMono', 'FiraCode', 'FiraMono',
'Go-Mono', 'Gohu', 'Hack', 'Hasklig', 'HeavyData', 'Hermit', 'iA-Writer',
'IBMPlexMono', 'Inconsolata', 'InconsolataGo', 'InconsolataLGC', 'Iosevka',
'IosevkaTerm', 'JetBrainsMono', 'Lekton', 'LiberationMono', 'Lilex',
'Meslo', 'Monofur', 'Monoid', 'Mononoki', 'MPlus', 'NerdFontsSymbolsOnly',
@MovGP0
MovGP0 / warp_theme.yaml
Created April 10, 2025 15:50
Warp Terminal Theme
# place in $env:APPDATA\warp\Warp\data\themes\standard
accent: '#3f4249'
background: '#0c0d0e'
details: darker
foreground: '#ffffff'
terminal_colors:
bright:
black: '#555555'
blue: '#708f9d'
cyan: '#809edb'
@MovGP0
MovGP0 / ControlExtensions.cs
Created October 3, 2024 23:41
DSL for aligning WinForms controls
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using System.Reactive.Disposables;
public static class ControlExtensions
{
public static IDisposable IsRightOf(this Control control, Control target, int spacing = 0, VisibilityBehavior behavior = VisibilityBehavior.MaintainSpacing)
{
SELECT MIN(CustomerNumber + 1)
FROM Customer
WHERE NOT EXISTS (SELECT * FROM Customer WHERE CustomerNumber = MIN(CustomerNumber) + 1)
@MovGP0
MovGP0 / Find double lines.regex
Created December 14, 2022 08:15
Helpful Regex strings
^(.+)\n(?=.*^\1$)
@MovGP0
MovGP0 / Get-InternetTime.ps1
Created April 23, 2021 12:25
Get the time from an NTP server
function Get-InternetTime
{
param($NtpServer = 'time.windows.com')
try
{
$address = [Net.Dns]::GetHostEntry($NtpServer).AddressList[0];
}
catch
{
@MovGP0
MovGP0 / Configure-Site.ps1
Last active April 19, 2021 16:08
Administrate IIS via Powershell
# source: https://adamtheautomator.com/powershell-iis/
New-Item -ItemType Directory -Name 'MyWebsite' -Path 'C:\inetpub\wwwroot';
New-IISSite `
-Name 'MyWebsite' `
-PhysicalPath 'C:\inetpub\wwwroot\MyWebsite';
New-IISSiteBinding `
-Name 'MyWebsite' `
-BindingInformation "*:443:" `
-CertificateThumbPrint "D043B153FCEFD5011B9C28E186A60B9F13103363" `
@MovGP0
MovGP0 / Install Docker.ps1
Created November 13, 2020 15:48
Install Docker on Windows Server 2019
# install dependencies
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -NoRestart
Install-WindowsFeature RSAT-Hyper-V-Tools -IncludeAllSubFeature
Restart-Computer –Force
# install provider
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
Install-Package -Name docker -ProviderName DockerMsftProvider
Restart-Computer –Force
@MovGP0
MovGP0 / Visual Studio Named Instance.ps1
Created November 13, 2020 09:37
Visual Studio Named Instance
.\vs.exe --nickname Reports --installPath 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Reports\'
@MovGP0
MovGP0 / Get_changes_on_table_schema.sql
Created November 4, 2020 13:53
Analyze SQL Server Transaction logs
DECLARE @fileName NVARCHAR(MAX) = N'c:\foo.trn';
SELECT
SUSER_SNAME (l.[Transaction SID]) AS [User],
l.*
FROM sys.fn_dump_dblog(NULL,NULL,N'DISK',1, @fileName,
DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,
DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,
DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,