- Open your Keycloak realm.
- Import
keycloak-gitlab.json
. - Fix URLs of the client.
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
(* | |
Toggle GlobalProtect VPN with AppleScript | |
Tested using macOS Ventura 13.4.1 and GlobalProtect version 6.2.0-89 | |
Written by Trevor Manternach, August 2023. | |
*) | |
tell application "System Events" to tell process "GlobalProtect" | |
click menu bar item 1 of menu bar 2 | |
set statusText to name of static text 1 of window 1 | |
if statusText is "Not Connected" 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
(defn response | |
([status body] | |
{:status status | |
:headers {} | |
:body body})) | |
(defmacro http-status [code sym] | |
`(def ~sym (partial response ~code))) | |
(defmacro http-statuses [& pairs] |
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 bash script to update a Cloudflare DNS A record with the external IP of the source machine | |
# Used to provide DDNS service for my home | |
# Needs the DNS record pre-creating on Cloudflare | |
# Proxy - uncomment and provide details if using a proxy | |
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport> | |
# Cloudflare zone is the zone which holds the record |
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
#!groovy | |
// imports | |
import com.dubture.jenkins.digitalocean.DigitalOceanCloud | |
import com.dubture.jenkins.digitalocean.SlaveTemplate | |
import jenkins.model.Jenkins | |
// parameters | |
def slaveTemplateParameters = [ | |
idleTerminationInMinutes: '10', |
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 | |
bucket=$1 | |
set -e | |
echo "Removing all versions from $bucket" | |
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions | .[] | select(.IsLatest | not)'` | |
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'` |
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
# pip install logentries-lecli | |
# then configure as per https://blog.logentries.com/2016/07/introduction-to-the-logentries-command-line-interface/ | |
# logsets with logs in them | |
lecli get logs | jq -r '.logs[].logsets_info[].id' | sort -u > have_logs | |
# all logset ids | |
lecli get logsets | jq -r '.logsets[] | .id' | sort > logsets | |
for ls in $(comm logsets have_logs | grep -v "$(printf '\t')") |
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
# This script generates mkdocs friendly Markdown documentation from a python package. | |
# It is based on the the following blog post by Christian Medina | |
# https://medium.com/python-pandemonium/python-introspection-with-the-inspect-module-2c85d5aa5a48#.twcmlyack | |
import pydoc | |
import os, sys | |
module_header = "# Package {} Documentation\n" | |
class_header = "## Class {}" | |
function_header = "### {}" |
exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.
Disk Utility is unable to repair this at first, but the fix is this:
- Use
diskutil list
to find the right drive id. - You want the id under the IDENTIFIER column, it should look like
disk1s1
- Run
sudo fsck_exfat -d <id from above>
. egsudo fsck_exfat -d disk1s3
-d
is debug so you'll see all your files output as they're processed.- Answer
YES
if it gives you the promptMain boot region needs to be updated. Yes/No?
NewerOlder