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
[params.social.Mastodon] | |
# your social ID | |
id = "@xxxx" | |
# prefix of your social link | |
prefix = "https://<your mastodon instance here>/" | |
# content hovering on the icon | |
title = "Mastodon" |
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
<# | |
Author: josh smith | |
Date: 2022-09-22 | |
Purpose: The challenge of converting integers to bigintegers was mainly one of time and simply | |
altering the column data type led to _extremely_ long runtimes that could be mitigated | |
by creating copy of the table from scratch with the correct data type and then transfering | |
the data in. This script leverages the dbatools PowerShell module (www.dbatools.io) to do just that. |
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
<# | |
Author: Josh Smith | |
Created: 2020-09-03 | |
This script will parse through SQL Doc Generated markdown files to create Jekyll friendly | |
db documentation. | |
Should be run from the root directory of the documentation repository. | |
#> | |
function createHeader { param ($subject, $link, $page) |
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
/* We collect the results daily and haven't been too concerned | |
about lost history if a particular instance fails occasionally */ | |
DELETE FROM | |
dbo.secPoll; | |
CREATE TABLE ##userQuery | |
( | |
serverName VARCHAR(255) | |
, databaseName VARCHAR(255) |
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
[ | |
{ | |
"ContainerName" : "myFirstContainer", | |
"DatabaseName" : "myFirstDatabase", | |
"ResourceName" : "cosmos-db-service-1" | |
}, | |
{ | |
"ContainerName" : "mySecondContainer", | |
"DatabaseName" : "myFirstDatabase", | |
"ResourceName" : "cosmos-db-service-1" |
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
<# | |
Author: Josh Smith | |
Created: 2020-03-02 | |
Purpose: Will pull all databases and containers from known CosmosDB resources. | |
Cosmos db services must be known and added to the array below (paired with the | |
associated resource group). | |
#> | |
<# add cosmos db resource and groups here as needed: #> |
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
# The build number format is YYYY.MM.B (Year.Month.BuildCounter) | |
$MonthCounter = ([DateTime]::Now.Month).ToString().PadLeft(2, "0") | |
$YearCounter = ([DateTime]::Now.Date.Year).ToString() | |
$DayCounter = ([DateTime]::Now.Day).ToString().PadLeft(2, "0") | |
$TimeCounter = ([DateTime]::Now.Hour).ToString().PadLeft(2, "0") | |
$MinuteCounter = ([DateTIme]::Now.Minute).ToString().PadLeft(2, "0") | |
$counter = "$YearCounter.$MonthCounter.$DayCounter.$TimeCounter" + $MinuteCounter |
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
[ | |
{ | |
"_comment" : ["This is a sample object that should be modified for deployment.", | |
"Connect strings will need to be inserted and correct service, database and collection", | |
"names included as well as setting the database backup flag to true as needed."], | |
"service" : { | |
"name" : "<name of your cosmos db service>", | |
"connectString" : "<read-only connect string here>", | |
"databases" : [ {"name" : "database1", |
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
<# | |
This script will call the cosmos db migration tool with the correct parameters based | |
on a list of databases that need to be backed up. It depends on a json param file that | |
contains the list of cosmos db services that have databases that require backup. | |
This script has a couple of dependencies: | |
(1) the dt.exe that it runs (the cosmos db migration tool and we assume the associated files/dlls | |
in the compiled folder) needs to be locally available. |
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
/* Preface the string with N or | |
SQL will pre-emptively destroy | |
the data before storing the string */ | |
DECLARE @nv AS NVARCHAR(10) = N'╥«┘{║‼℈≠' | |
, @v AS VARCHAR(10); | |
SELECT @nv, CAST(@nv AS VARCHAR(10)); | |
/* And by reassigning we can see | |
the data is permanently lost */ |
NewerOlder