Skip to content

Instantly share code, notes, and snippets.

View tomaustin700's full-sized avatar
🏠
Working from home

Tom Austin tomaustin700

🏠
Working from home
View GitHub Profile
@tomaustin700
tomaustin700 / gist:af3a11fb4434e29d8ac85c8e9a4027bc
Created December 14, 2021 11:42 — forked from metaskills/gist:893599
A Copy Of sp_MSforeachtable Stored Procedure For Azure, Uses sp_MSforeach_worker
CREATE proc [dbo].[sp_MSforeachtable]
@command1 nvarchar(2000), @replacechar nchar(1) = N'?', @command2 nvarchar(2000) = null,
@command3 nvarchar(2000) = null, @whereand nvarchar(2000) = null,
@precommand nvarchar(2000) = null, @postcommand nvarchar(2000) = null
AS
declare @mscat nvarchar(12)
select @mscat = ltrim(str(convert(int, 0x0002)))
if (@precommand is not null)
exec(@precommand)
@tomaustin700
tomaustin700 / install-powershell.sh
Created January 9, 2018 09:49
Install Powershell on Ubuntu 16.10
#!/bin/bash
# from https://blogs.msdn.microsoft.com/powershell/2017/02/01/installing-latest-powershell-core-6-0-release-on-linux-just-got-easier/
# Import the public repository GPG keys
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
# Register the Microsoft Ubuntu repository
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
# Update apt-get