Skip to content

Instantly share code, notes, and snippets.

aws-token(){
aws_token_sn=arn:aws:iam::REDACTED_ACCT_NUM:mfa/REDACTED_USER_PASSWD
aws_token_duration=43200
export AWS_ACCESS_KEY_ID=""
export AWS_SECRET_ACCESS_KEY=""
export AWS_SESSION_TOKEN=""
read -p "MFA Code: " aws_token_code
OUT="$(aws sts get-session-token \
--serial-number $aws_token_sn \
@jamesharr
jamesharr / .bashrc
Last active August 26, 2020 17:04
TMUX snippet
_start_tmux() {
# Skip if we're not interactive
[ -z "$PS1" ] || return
echo $- | grep -qs i || return
# Skip if we're logged in via VSCode
[ -z "$VSCODE_IPC_HOOK_CLI" ] || return
# Skip if we're not on an ssh connection
[ -z "$SSH_CONNECTION" ] && return
@jamesharr
jamesharr / ssh_config
Last active March 27, 2021 14:31
Fun with macOS, ssh, and text-to-speech
# ~/.ssh/config
Host bingbingbong
HostName 192.0.2.1
PermitLocalCommand yes
LocalCommand say '[[volm 0.5]]' bing bing bong &
@jamesharr
jamesharr / 000-README.md
Last active December 23, 2021 00:03
Cilium DNS Test Problems

I'm having a problem getting FQDNs working, and I figured I'd post here to see if anyone could help.

The logs I'm seeing from hubble observe seem to fly directly in the face of the policy that's written.

The Kubernetes manifest is attached as dns-return-test.yml. The cluster is K3s (latest) running fairly stock. See below for details.

Things that seemed odd to me:

  • I had to explicitly allow return traffic from kube-dns to my pods, if that was not in the manifest, DNS would not work and hubble observe would show a weird ERROR. The specific area of the manifest is noted.
  • Disabling DNS inspection (noted in manifest) would cause DNS to work fine without the aforementioned rule. FQDNs wouldn't work, but DNS would.