This file contains hidden or 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 TOP 10 d.object_id, d.database_id, OBJECT_NAME(object_id, database_id) 'proc name', | |
d.cached_time, d.last_execution_time, d.total_elapsed_time, | |
d.total_elapsed_time/d.execution_count AS [avg_elapsed_time], | |
d.last_elapsed_time, d.execution_count | |
FROM sys.dm_exec_procedure_stats AS d | |
WHERE OBJECT_NAME(object_id, database_id) = 'sp_GlobalIndex_IncrementalUpdate_GetDocuments' | |
ORDER BY [total_worker_time] DESC; |
This file contains hidden or 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
REM Dev Box Setup | |
REM This script sets up my dev boxes for virtual machines that I use. | |
REM It will go through and 1st install Chocolatey, then it will installs extensions for vs code and perform various | |
REM other setup functions. | |
REM M. Mahon | |
REM @jetstreamin | |
REM Chocolaty Command Reference: https://chocolatey.org/docs/commands-reference |
This file contains hidden or 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
PROJNAME=$1 | |
mkdir $PROJNAME | |
echo Making $PROJNAME | |
mkdir -p $PROJNAME/src && cd $PROJNAME | |
npm init | |
touch index.html | |
touch src/app.js | |
npm install | |
npm start |
This file contains hidden or 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
IF EXISTS (SELECT * | |
FROM sys.foreign_keys | |
WHERE object_id = OBJECT_ID(N'dbo.FK_TableName_TableName2') | |
AND parent_object_id = OBJECT_ID(N'dbo.TableName') | |
) | |
ALTER TABLE [dbo.TableName] DROP CONSTRAINT [FK_TableName_TableName2] |
This file contains hidden or 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
<CORSConfiguration> | |
<CORSRule> | |
<AllowedOrigin>*</AllowedOrigin> | |
<AllowedMethod>GET</AllowedMethod> | |
<MaxAgeSeconds>3000</MaxAgeSeconds> | |
<AllowedHeader>Authorization</AllowedHeader> | |
</CORSRule> | |
</CORSConfiguration> |
This file contains hidden or 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
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Cognito Stack | |
Parameters: | |
AuthName: | |
Type: String | |
Description: Unique Auth Name for Cognito Resources | |
Resources: | |
# Creates a role that allows Cognito to send SNS messages | |
SNSRole: |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<CORSConfiguration xmlns="https://s3.amazonaws.com/doc/2006-03-01"> | |
<CORSRule> | |
<AllowedOrigin>*</AllowedOrigin> | |
<AllowedMethod>GET</AllowedMethod> | |
<AllowedMethod>PUT</AllowedMethod> | |
<AllowedMethod>POST</AllowedMethod> | |
<AllowedMethod>DELETE</AllowedMethod> | |
<MaxAgeSeconds>3000</MaxAgeSeconds> | |
<AllowedHeader>*</AllowedHeader> |
This file contains hidden or 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
{ | |
"Id": "XXX", | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "XXX", | |
"Action": [ | |
"s3:GetObject" | |
], | |
"Effect": "Allow", |
This file contains hidden or 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
# Use the hash sign to prefix a comment | |
# +---------------- minute (0 - 59) | |
# | +------------- hour (0 - 23) | |
# | | +---------- day of month (1 - 31) | |
# | | | +------- month (1 - 12) | |
# | | | | +---- day of week (0 - 7) (Sunday=0 or 7) | |
# | | | | | | |
# * * * * * command to be executed | |
#-------------------------------------------------------------------------- | |
This file contains hidden or 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
# plucked from https://stackoverflow.com/a/25180186 | |
#!/bin/bash | |
function try() | |
{ | |
[[ $- = *e* ]]; SAVED_OPT_E=$? | |
set +e | |
} |