Skip to content

Instantly share code, notes, and snippets.

View phenixita's full-sized avatar

Michele phenixita

View GitHub Profile
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
::dcp::docker container prune
Return
::dvp::docker volume prune
Return
@phenixita
phenixita / New-SelfSignedCert.ps1
Created March 4, 2019 21:01
Create a self signed certificate for development/testing purposes with PowerShell
$cert = New-SelfSignedCertificate -DnsName mydemowebapp.net -CertStoreLocation cert:\LocalMachine\My
$pwd = ConvertTo-SecureString -String "MyPassword" -Force -AsPlainText
Export-PfxCertificate -Cert $cert -FilePath C:\temp\cert.pfx -Password $pwd
@phenixita
phenixita / DropAndCreateWithKill.sql
Created February 12, 2019 08:40
Drop and create database with kill processes
USE master
GO
-- Creating the ModernApiDB
DECLARE @dbname sysname
SET @dbname = 'MY_DB'
DECLARE @spid int
SELECT @spid = min(spid) from master.dbo.sysprocesses where dbid = db_id(@dbname)
WHILE @spid IS NOT NULL
BEGIN
@phenixita
phenixita / SQL-Server-Perfromance-Counter.txt
Last active January 17, 2019 21:01
Performance Counter for SQL Server
Sensori
SQL Memory
\Memory\Pages/sec::pages/sec
\Memory\Page Faults/sec::pages/sec
\Memory\Pages Input/sec::pages/sec
\Memory\Pages Output/sec::pages/sec
\Memory\Page Reads/sec::pages/sec
\Memory\Page Writes/sec::pages/sec
\Memory\Available Bytes::bytes