Skip to content

Instantly share code, notes, and snippets.

@craigtp
craigtp / LargestDBs
Last active November 16, 2023 15:41
List the largest databases on a SQL Server instance
SELECT DB_NAME(database_id) AS DatabaseName,
Name AS Logical_Name,
Physical_Name, (size*8)/1024 SizeMB
FROM sys.master_files
ORDER BY SizeMB DESC
@craigtp
craigtp / GetWindowsProductKey.vbs
Created May 30, 2016 18:10
Retrieve Windows Product Key
Option Explicit
Dim objshell,path,DigitalID, Result
Set objshell = CreateObject("WScript.Shell")
'Set registry key path
Path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"
'Registry key value
DigitalID = objshell.RegRead(Path & "DigitalProductId")
Dim ProductName,ProductID,ProductKey,ProductData
'Get ProductName, ProductID, ProductKey
@craigtp
craigtp / AdvancedDistributedSystemDesignCourseNotes.md
Created May 1, 2020 19:38
Notes on Udi Dahan's Advanced Distributed System Design Course

Advanced Distributed System Design Course - Udi Dahan

Notes by Craig Phillips

Fallacies of Distributed Computing

  • There are 11 fallacies of Distributed Computing:
    1. The network is reliable
    2. Latency isn’t a problem
    3. Bandwidth isn’t a problem
    4. The network is secure
  1. The topology won’t change