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/sh | |
# Create folder structure before cloning repository | |
# | |
# Example: | |
# Running `git clonex [email protected]:sygnum/securesite.git` is equivalent to: | |
# $ mkdir -p sygnum/securesite | |
# $ git clone [email protected]:sygnum/securesite.git sygnum/securesite | |
url="$1" | |
if [[ -z "$url" ]]; 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
#!/usr/bin/env zsh | |
# Usage: | |
# convert_timezone <source timezone> <target timezone> <date string...> | |
# | |
# Examples: | |
# Asia/Singapore (now) -> Europe/Zurich | |
# $ convert_timezone Asia/Singapore Europe/Zurich | |
# | |
# Asia/Singapore (4 pm) -> Europe/Zurich |
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
#!/usr/bin/env bash | |
function show-help() { | |
echo "usage: picsum <width> [height]" | |
} | |
function download-image() { | |
curl --location "https://picsum.photos/${1}/${2}" --output "$3" 2>/dev/null | |
echo "$3" | |
} |
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
# Connect to bastion host | |
# `ssh bastion` | |
Host bastion | |
HostName bastion.example.com | |
User admin | |
IdentityFile ~/.ssh/bastion.example.com.pem | |
# Connect to private host through bastion host | |
# `ssh bastion+ip-1-2-3-4.example.internal` | |
Host bastion+* |