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
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 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 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 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 |
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
# Creates a PFX certificate using CertBot | |
# | |
# TODO: Use hooks to implement automation via GoDaddy | |
# https://certbot.eff.org/docs/using.html#hooks | |
# exit when any command fails | |
set -e | |
if [ "$1" == "" ] || [ "$2" = "" ] | |
then |
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
#r "Microsoft.Azure.EventHubs" | |
using System; | |
using System.Text; | |
using Microsoft.Azure.EventHubs; | |
public static async Task Run(EventData[] events, ILogger log) | |
{ | |
var exceptions = new List<Exception>(); |
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
#!/bin/bash | |
# Gets all chat messages from a Bold360 account | |
# you can easily pipe this to output file with: | |
# ./extract-bold-chat.sh | jq '.Data' > output.json | |
accountId=[YOUR_ACCOUNT_KEY] | |
apiSettingId=[YOUR_API_SETTING_KEY] | |
apiKey=[YOUR_API_KEY] |
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
// Can be found at https://jsfiddle.net/jkem8nsz/49/ | |
// HTML | |
<a href="#" id="text"> | |
click to show modal<br > | |
</a> | |
<div id="modal" class="modal-outer"> | |
<div class="modal-middle"> | |
<div class="modal-inner"> |
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
<# | |
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 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
# Gets the trade-in value on KBB | |
var rangeBox = document.getElementById("RangeBox") | |
var html = rangeBox.innerHTML | |
html.substring(html.indexOf("y=\"-8") + 8, html.lastIndexOf("</")) |
NewerOlder