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
<# | |
Changes staging to use a newly restored database | |
#> | |
param ( | |
[Parameter(Mandatory, Position=0)][string]$newDbName | |
) | |
$appPoolName = 'NopAbc_Test' | |
$directory = 'C:\NopABC_Test' |
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
# before running: | |
# | |
# 1. Install dependencies: | |
# cd remnant-2-video-analyzer | |
# pip install opencv-python pytesseract | |
# 2. Install Tesseract (https://github.com/tesseract-ocr/tesseract) | |
# 3. Run python script: | |
# python main.py | |
import cv2 |
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
''' | |
Clean up branches older than a specified time based on last commit. | |
Token rights required: api | |
''' | |
import sys | |
import os | |
import requests | |
from datetime import datetime | |
# Get personal access token from env. variables |
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
package.json | |
============ | |
{ | |
"dependencies": { | |
"@google-cloud/functions-framework": "^3.0.0", | |
"crypto-js": "4.2.0", | |
"node-fetch": "2.6.1" | |
} | |
} |
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
<# | |
Backs up and optionally restores a SQL Server database. | |
#> | |
param ( | |
[Parameter(Mandatory, Position=0)][string]$backupDbName, | |
[Parameter(Position=1)][string]$restoreDbName | |
) | |
$timestamp = $(((get-date).ToUniversalTime()).ToString("yyyyMMddTHHmmssZ")); |
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
#!/usr/bin/python | |
# Gets full list of ILB certs and provides days remaining until expiration | |
# Output breakout by index: | |
# 0: NAME header | |
# 1: TYPE header | |
# 2: CREATION_TIMESTAMP header | |
# 3: EXPIRE_TIME header | |
# 4: REGION header |
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
CREATE PROCEDURE sp_index_maintenance | |
AS | |
-- Drop temp table if it exists | |
IF OBJECT_ID(N'tempdb..#FragmentedIndexes') IS NOT NULL | |
BEGIN | |
DROP TABLE #FragmentedIndexes | |
END | |
-- Add fragmented indexes to temp table | |
CREATE TABLE #FragmentedIndexes |
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
#!/bin/bash | |
# Creates a PFX certificate using CertBot | |
# exit when any command fails | |
set -e | |
if [ "$1" == "" ] || [ "$2" = "" ] | |
then | |
echo "Usage: pfxcert <domain> <output_filename>" |
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
#!/bin/bash | |
# Adds the appropriate TXT record for creating a Let's Encrypt certificate. | |
# exit when any command fails | |
set -e | |
if [ "$1" == "" ] || [ "$2" == "" ] | |
then | |
echo "GODADDY_API_KEY and GODADDY_API_SECRET arguments required." |
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
#!/bin/bash | |
# Deletes the appropriate TXT record after creating a Let's Encrypt certificate. | |
# exit when any command fails | |
set -e | |
if [ "$1" == "" ] || [ "$2" == "" ] | |
then | |
echo "GODADDY_API_KEY and GODADDY_API_SECRET arguments required." | |
exit 1 |
NewerOlder