This file contains 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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Feeds] | |
"EdgeMUID"="3F61B1E2FEFB605D2878BB1DFFEC6166" | |
"IsAnaheimEdgeInstalled"=dword:00000001 | |
"osLocale"="en-US" | |
"IsFeedsAvailable"=dword:00000000 | |
"ShellFeedsTaskbarViewMode"=dword:00000002 | |
"HeadlinesOnboardingComplete"=dword:00000001 |
This file contains 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
# write what we want, then use it in a loop | |
function Update-Spaces { | |
param ($path) | |
$contents = Get-Content $path | |
$contents -replace "\s+",", " | Set-Content $path -Force | |
} | |
# now say we have multiple files, we need to loop and rewrite | |
# for each file in the folder that the script provides, filtering files that contain the filter |
This file contains 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 @eva table -- entity value attribute | |
( | |
id int identity, -- we could use date here either | |
type nvarchar(100), | |
value nvarchar(100), | |
student_identifier int | |
) | |
insert @eva (type, value, student_identifier) | |
select 'studentid', '1', 3 |
This file contains 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
CREATE OR ALTER procedure #data_sampler | |
( | |
@schema_name NVARCHAR(128) = 'dbo', | |
@object_name NVARCHAR(128) | |
) | |
AS | |
BEGIN | |
SET NOCOUNT ON; | |
DECLARE |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 * | |
FROM | |
( | |
SELECT | |
STUFF(( | |
SELECT '' + comp.entity_data AS [text()] | |
FROM ( | |
SELECT | |
DISTINCT | |
number |
This file contains 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
-- You can either pass a format string, or you could store it in a table per row | |
-- If you want to support additional cases, just modify the last CROSS APPLY | |
DECLARE @format_string nvarchar(500) = 'X###XXX###' | |
SELECT STRING_AGG(result.chars,'') AS strings | |
FROM sys.objects AS m | |
CROSS APPLY | |
( | |
SELECT |
This file contains 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
Import-Module dbatools | |
Set-StrictMode -Version 2 | |
function Get-InsecureCredential { | |
param ($Username, $Password) | |
Write-Debug "Get-InsecureCredential." | |
$SecurePassword = $Password | ConvertTo-SecureString -AsPlainText -Force | |
$Credential = New-Object System.Management.Automation.PSCredential ($Username, $SecurePassword) | |
return $Credential | |
} |
This file contains 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
# | |
Set-StrictMode -Version 2 | |
$ErrorActionPreference = "Stop" | |
function Convert-StringToMarkdownTableOfContents { | |
param ([string]$MarkdownDocument) | |
$nl = [System.Environment]::NewLine | |
$TOC = "## Table Of Contents$nl$nl" |
NewerOlder