Skip to content

Instantly share code, notes, and snippets.

💭
And the monkey flips the switch...

John Morehouse airtank20

💭
And the monkey flips the switch...
Block or report user

Report or block airtank20

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@airtank20
airtank20 / GenerateSQLSaturdaySpeakerTweets.ps1
Created Jul 3, 2018
Generate SQL Saturday Speaker Tweeks
View GenerateSQLSaturdaySpeakerTweets.ps1
##########################################################################################
#- Author: John Morehouse
# Date: August 2015
# T: @SQLRUS
# E: john@jmorehouse.com
# B: http://sqlrus.com
#
# THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY
# AND/OR FITNESS FOR A PARTICULAR PURPOSE.
#
@airtank20
airtank20 / Backup Restore With Move Commands.sql
Created Jan 18, 2018
TSQL script that will provide a backup & restore command
View Backup Restore With Move Commands.sql
DECLARE @date CHAR(8)
SET @date = (SELECT CONVERT(char(8), GETDATE(), 112))
DECLARE @path VARCHAR(125)
SET @path = '\\UNCPath\Folder\'
;WITH MoveCmdCTE ( DatabaseName, MoveCmd )
          AS ( SELECT DISTINCT
                        DB_NAME(database_id) ,
@airtank20
airtank20 / PoSH_Postback.ps1
Created Jan 7, 2018
Script to download file from javascript Postback
View PoSH_Postback.ps1
#URL that needs to be fetched
$url = "https://site.state.gov/default.aspx"
#get the server name in case the process jumps to another script
$serverName = $env:computername
#wrapped it into a try/catch for some type of error handling
TRY {
#use invoke-webrequest to fetch a session from the site
Invoke-WebRequest $url -SessionVariable session -UseBasicParsing
You can’t perform that action at this time.