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 | |
# | |
# awscli-sso-config - generates AWS CLI config file for | |
# SSO accounts and roles | |
# | |
# Usage: ./awscli-sso-config.sh aws_profile sso_start_url [--resume] | |
# | |
# Requires: awscli, jq | |
# | |
# Author: Naaman Campbell |
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
REMOTE_NAME=OneDrive | |
MOUNT_DIR=/home/USERNAME/OneDrive | |
RCLONE_MOUNT_VFS_CACHE_MODE=writes |
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
let excludedLanguages = ['Chinese', 'French', 'Italian', 'Japanese', 'Korean', 'Portuguese', 'Spanish'] | |
for (const tagsDiv of document.querySelectorAll(".event-list-item-tags")) { | |
for (const tagDiv of tagsDiv.querySelectorAll(".tag")) { | |
if (excludedLanguages.includes(tagDiv.textContent)) { | |
let parentDiv = tagsDiv.closest(".event-list-item") | |
parentDiv.parentNode.removeChild(parentDiv) | |
break | |
} | |
} |
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
--- | |
title: "Boy Swallows Universe - Routes" | |
author: "Naaman Campbell" | |
date: "11 January 2020" | |
output: | |
html_document: | |
code_folding: hide | |
--- | |
```{r setup, include=FALSE} |
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
{% for activity in activities %} | |
<div class="post"> | |
{% if activity.strava_data['map']['polyline'] is not none %} | |
<div id="map_{{ activity.id }}" class="img-fluid" style="height: 300px;"></div> | |
{% endif %} | |
{# other activity data #} | |
</div> | |
{% endfor %} |
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 argparse | |
import boto3 | |
""" | |
Usage: copy_lambda_env_vars.py [-h] [--src-profile-name SRC_PROFILE] | |
[--dst-profile-name DST_PROFILE] | |
src_function dst_function | |
Utility to copy environment variables from source Lambda function to | |
destination Lambda function. |
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
## generate Certificate Signing Request (CSR) with certutil | |
$FedServiceName = "sts.clancampbell.id.au" | |
$RequestPolicy = @" | |
[Version] | |
Signature="`$Windows NT$" | |
[NewRequest] | |
Subject = "CN=$FedServiceName,OU=ICT,O=ClanCampbell,L=Brisbane,S=Queensland,C=AU" | |
Exportable = FALSE ; TRUE = Private key is exportable | |
KeyLength = 2048 ; Valid key sizes: 1024, 2048, 4096, 8192, 16384 | |
KeySpec = 1 ; Key Exchange – Required for encryption |
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
<# | |
.SYNOPSIS | |
Generates and distributes encrypted passwords for use with PowerShell scripts used in CloudFormation templates. | |
.DESCRIPTION | |
The CloudFormation-PowerShell-Creds script is designed to be run prior to running a CloudFormation stack | |
then called again from within the CloudFormation template. The purpose is to avoid the use of cleartext | |
passwords in CloudFormation templates/PowerShell scripts. | |
There are three main components of this script: |
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
# ADMgmt | |
## install chocolatey | |
Set-ExecutionPolicy Bypass; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
## install firefox | |
choco install -y firefox | |
## install AD Tools | |
Import-Module ServerManager | |
Add-WindowsFeature RSAT-AD-Tools | |
## create testing accounts | |
New-ADOrganizationalUnit -Name "Groups" -Path "OU=CLANCAMPBELL,DC=clancampbell,DC=id,DC=au" |
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
{ | |
"bindings": [ | |
{ | |
"type": "httpTrigger", | |
"direction": "in", | |
"name": "req", | |
"authLevel": "anonymous", | |
"methods": [ | |
"get", | |
"post" |
NewerOlder