This file contains hidden or 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
enable=add-default-case | |
enable=avoid-nullary-conditions | |
enable=check-extra-masked-returns | |
enable=check-set-e-suppressed | |
enable=check-unassigned-uppercase | |
enable=require-double-brackets |
This file contains hidden or 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 | |
access_token="$(jq -r .accessToken < $(ls -1U ~/.aws/sso/cache/*.json | head -n 1))" | |
aws sso list-accounts --access-token "$access_token" --output table |
This file contains hidden or 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
Host i-* | |
User ubuntu | |
ProxyCommand bash -c "aws ec2-instance-connect send-ssh-public-key --ssh-public-key file://~/.ssh/id_ed25519.pub --instance-os-user %r --instance-id %h; aws ec2-instance-connect open-tunnel --instance-id %h" |
This file contains hidden or 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
# vim: ft=systemd | |
[Unit] | |
Description=Tail %I logs into the journal | |
After=%i.service | |
BindsTo=%i.service | |
[Service] | |
Type=exec | |
ExecStart=tail -n 0 -F /path/to/file |
This file contains hidden or 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 | |
# Usage: | |
# git cocommit -a "Fionn <fionn@github.com>" \ | |
# -a "Another committer <example@example.com>" \ | |
# -- -m "Commit message" ... | |
set -euo pipefail | |
declare -a TRAILER_FLAGS |
This file contains hidden or 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
export ZLE_SPACE_SUFFIX_CHARS=$'&|' |
This file contains hidden or 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 python3 | |
import sys | |
with open(sys.argv[1], encoding="utf8") if len(sys.argv) == 2 else sys.stdin as f: | |
pass |
This file contains hidden or 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
(?P<subject>(^[A-Z][A-Za-z]+[^ing|ed] )(.{1,50}[^.])$)(\n\n(?P<body>(^.{1,80}$)(\n{0,2})+)*) |
This file contains hidden or 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 | |
set -euo pipefail | |
function file_ends_with_newline { | |
[[ $(tail -c1 "$1" | wc -l) -gt 0 ]] | |
} | |
function main { | |
count=0 |
This file contains hidden or 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 asyncio | |
from typing import TypeVar, Any | |
T = TypeVar("T") | |
def sync(f: Coroutine[None, None, tuple[T, Any, Any]]) -> T: | |
return asyncio.run(f)[0] |
NewerOlder