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 | |
set -e | |
TZ=Europe/London | |
TODAY=$(date -Idate) | |
DATE_90=$(date --date="90 days ago" +"%Y-%m-%d") | |
SILENT=0 | |
################################################################################ | |
# Author: |
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 | |
set -e | |
TODAY=$(date -Idate) | |
TZ=Europe/London | |
################################################################################ | |
# Author: | |
# Ash Davies <@DrizzlyOwl> | |
# Version: |
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 | |
set -euo pipefail | |
# Default values for CLI flags | |
SERVER="" | |
DATABASE="" | |
# Use a Service Principal or an Azure AD user with admin rights for your SQL Server | |
USERNAME="" | |
PASSWORD="" # Or use "your_service_principal_client_secret" for Service Principal |
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 | |
# Echo usage if something isn't right. | |
usage() { | |
echo "Usage: $0" | |
echo " [-r <resource-group>] Name of the Azure Resource Group" | |
echo " [-v <keyvault>] Name of the Key Vault that will hold the Customer Managed Key" | |
echo " [-s <storage-account>] Name of the target Storage Account that needs to have CMK Encryption enabled" | |
echo " [-k <key-name>] Name of the new CMK" | |
echo " [-e <email>] Email address of the user-managed identity that can access the Key Vault" 1>&2; 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
# Path to oh-my-zsh installation. | |
export ZSH="$HOME/.oh-my-zsh" | |
ZSH_THEME="af-magic" | |
# jbergantine is like toothpaste = good | |
# eastwood is nice and clean | |
# flazz is good | |
# nicoulaj is also good | |
# steeef is good | |
# half-life is good |
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 | |
# | |
# Author: Ash Davies | |
# Description: Checks a Cloudfuse mountpoint and reinitialises it if the mount goes missing | |
# | |
VOLUME="/path/to/content/uploads" | |
PROBE="$VOLUME/mounty.probe" | |
FOLDER="/path/to/cloudfuse/mount/" |
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
function onOpen() { | |
var ui = SpreadsheetApp.getUi(); | |
ui.createMenu('Rackspace API') | |
.addItem('Fetch latest billing data','fetchBilling') | |
.addToUi(); | |
} | |
function fetchBilling() { | |
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); | |
console.log('Task started'); |
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 | |
# @author Ash Davies <a.davies@mixd.co.uk> | |
FROM=$1 | |
TO=$2 | |
FILENAME=wp-config.php | |
BACKUP_FIRST=yes | |
TMP=$(mktemp) | |
# Terminate on any errors |
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
import json,sys; | |
a = json.load(sys.stdin); | |
packages = a['installed']; | |
num_packages = len(packages); | |
are_available_updates = bool(num_packages); | |
if are_available_updates: | |
print("There are "+str(num_packages)+" package updates available"); | |
print("\n"); |
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 | |
# | |
# A quick bash script to make it easier for non tech-savvy folks | |
# to create a vhost conf file and enable it for apache2. | |
# | |
# @author Ash Davies <a.davies@mixd.co.uk> | |
# @version 1.1.0 | |
# | |
asksure() { |
NewerOlder