Skip to content

Instantly share code, notes, and snippets.

@benrobot
benrobot / SpellOutDatabasePermissions.sql
Created August 22, 2023 21:44
Spell out permissions explicitly granted at the database level
USE MyDatabaseName
GO
SELECT CONCAT(
USER_NAME(grantee_principal_id)
,' is '
,state_desc
,'ED permission to '
,[permission_name]
,' on object '
@benrobot
benrobot / HashString.ps1
Created May 11, 2017 17:17
Powershell one liner to Hash a string using SHA256
new-object System.Security.Cryptography.SHA256Managed | ForEach-Object {$_.ComputeHash([System.Text.Encoding]::UTF8.GetBytes("The string to hash goes here"))} | ForEach-Object {$_.ToString("x2")} | Write-Host -NoNewline
<!doctype html>
<html>
<body>
<template id="weather-info">
<style>
h2 {
color: red;
}
</style>