This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT MIN(CustomerNumber + 1) | |
FROM Customer | |
WHERE NOT EXISTS (SELECT * FROM Customer WHERE CustomerNumber = MIN(CustomerNumber) + 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^(.+)\n(?=.*^\1$) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-InternetTime | |
{ | |
param($NtpServer = 'time.windows.com') | |
try | |
{ | |
$address = [Net.Dns]::GetHostEntry($NtpServer).AddressList[0]; | |
} | |
catch | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" ` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.\vs.exe --nickname Reports --installPath 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Reports\' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
NewerOlder