Skip to content

Instantly share code, notes, and snippets.

View SQLNinjacat.sql
/*Adrian Sullivan - 2020/12/17 Ninjacat with polygons.*/
/*SVG drawn using Inkscape, export and conversion done using custom code.*/
DECLARE @tt table(id int identity(0,1), label VARCHAR(50), gg GEOMETRY)
SET NOCOUNT ON
/*Add a point. This point gets layered each time we need to skip*/
DECLARE @g geometry = 'POLYGON((-121.97087 37.372518,-121.97087 37.372518,-121.970863 37.372517,-121.970845 37.372515,-121.97087 37.372518))'
DECLARE @i int = 1
WHILE @i <= 660
View Query Carbon Footprint.sql
/*
Core assumptions:
1. All thigs being equal except for CPU usage
2. Memory power consumption remains statatic
3. Storage power consumption remains static
4. Hyperthreading enabled
5. Base CPU consumption remains static
Refer to https://www.kompulsa.com/much-power-computers-consume/,
Base Watt Usage of CPU = =IF([@Basefreq]<2.2,75,IF([@Basefreq]<3.2,60,50))
6. CPU power usage per vCPU calculated as follows
@SQLAdrian
SQLAdrian / Hassen Tagari Memory.sql
Last active August 14, 2020 09:27
In loving memory of Hassen Tagari. 08/20/1972 to 09/08/2020.
View Hassen Tagari Memory.sql
/*Adrian Sullivan - 2020/08/14 Memories with polygons.*/
/*In loving memory of Hassen Tagari from Johannesburg, South Africa
08/20/1972 to 09/08/2020
A legend in the world of racing. Gone too young, too soon.
You will be remembered and missed.
May your legacy always live on and your soul rest in peace.
*/
DECLARE @tt table(id int identity(0,1), label VARCHAR(50), gg GEOMETRY)
@SQLAdrian
SQLAdrian / Hassen Tagari Memory.sql
Created August 14, 2020 07:35
In loving memory of Hassen Tagari from Lenasia, South Africa 08/20/1972 to 09/08/2020. Verily we belong to Allah, and verily to Him do we return.
View Hassen Tagari Memory.sql
This file has been truncated, but you can view the full file.
/*Adrian Sullivan - 2020/08/14 Memories with polygons.*/
/*In loving memory of Hassen Tagari from Lenasia, South Africa
08/20/1972 to 09/08/2020
If you read this, please say a prayer for him
Verily we belong to Allah, and verily to Him do we return.
إِنَّا لِلَّٰهِ وَإِنَّا إِلَيْهِ رَاجِعُونَ‎
ʾinnā li-llāhi wa-ʾinna ʾilayhi rājiʿūna
*/
@SQLAdrian
SQLAdrian / CV in SQL.sql
Created December 31, 2019 09:25
How I always imagined a SQL DBA CV to look
View CV in SQL.sql
/*Resume of Adrian Sullivan - Senior SQL Database Administrator*/
-- =============================================
-- Author: Adrian Sullivan
-- Create date: 2014-02-17
-- Description: Resume of Adrian Sullivan - Senior SQL Database Administrator
@SQLAdrian
SQLAdrian / drawbrent.sql
Last active December 22, 2022 08:57
Let's draw Brent
View drawbrent.sql
/*Adrian Sullivan - 2019/11/15 Fun with polygons.*/
/*Thanks to Michael J Swart for all the awesome work on color
https://michaeljswart.com/
*/
DECLARE @tt table(id int identity(0,1), label VARCHAR(50), gg GEOMETRY)
SET NOCOUNT ON
DECLARE @g geometry = 'POLYGON((-121.97087 37.372518,-121.97087 37.372518,-121.970863 37.372517,-121.970845 37.372515,-121.97087 37.372518))'