1153 words
@aftergibson

Atheist Religion

It’s 5am and I can’t sleep. I haven’t slept well in weeks. I’ve tried everything that’s recommended. Nothing works.

I remember when I was a kid and still believed in God. I’d say my nightly prayers and then straight to sleep. I’m not sure if it was the innocence of childhood or my faith that made it so easy but I’d try anything right now.

Maybe I could cobble together some personal spirituality, a mix of Alan Watts, meditation, maybe some Sam Harris and yoga. Maybe a sprinkle Krishnamurti. Has anyone out there put this together?

I could really do with the sleep.

TIL - What is CFN-Hup

CFN-Hup is a cloudformation daemon that detects and applies changes to the EC2 instance it's running on.

TIL - Python quick way to generate a bunch of strings from lists

Tidy way of generating a bunch of strings

    expected = [
        f'{region}:{account}:stack/system-stack-{stack}'
        for region in ['eu-west-1', 'eu-west-2']
        for account in ['1234', '5678']
        for stack in ['TestStack1', 'TestStack2']
    ]

Til - Python Mirrors Strip Metadata

A very annoying discovery today. Some pypi mirrors strip out python_requires metadata. This means that you may install a version of a package that isn't supported by your local version of python.

A fix is to edit the mirror in /etc/pip.conf but this admittedly very annoying.

TIL - Named Git Stash

You can name a git stash like so:

git stash push -m "message"

Thwn find it like so:

git stash list

And apply the specific stash like so:

git stash apply [email protected]{1}

However git diff may be a better solution

git diff > some.patch

And to apply

git apply some.patch

So I've added these to my shell aliases .

# Store patch
function gdsp() {
    git diff > ~/.stashes/$1.patch
    gdlp
}

# Apply patch
function gdap() {
    git apply ~/.stashes/$1.patch
    rm ~/.stashes/$1.patch
    gdlp
}

# List patches
function gdlp() {
    ls ~/.stashes/
}

TIL - How to match python regex groups

Use (.*) for matching groups in Python regexes

TIL - Git Rebase

In git, during rebase, ours and theirs are reversed. theirs is actually the current branch in the case of rebase.

TIL - Bash Shift

In bash, use shift to reassign positional arguments.

For example:

$1 $2 $3

Would become

$1 matches old $2
$2 matches old $3

TIL - AWS Summit - Spot Instances

Currently, ~5% of spot instances are getting taken out, but their pricing is 1/3 of an On-Demand instance.

TIL - AWS Summit - Latency

P99 and P95 latency refer to the percentage of requests should be faster than given latency.

Lazy Mindfuless

Recently I've been thinking a lot about being present, and how difficult I've found it to be present in the past, I tried so hard and could never crack it. My mind always going in any direction it wanted. Since my son arrived, I figured this quest would be impossible, I have no time to put the effort in. I'm present for my son where I can be but any free time, my mind is going everywhere.

Lately however, I'm noticing that something has started to shift in my mind. With work, chores, goals and my son I have very little time, but now when thoughts appear, there's a sort of effortless sluggishness that appears. When the thought appears my mind is beginning to lazily response with, "Nah, I can't be bothered" and it passes. I listen to Pzizz often at night to get to sleep, there's a sentence that the audio suggests to get to sleep which goes something like "Thoughts will arrive but you're not obligated to think them". Which sums it up perfectly.

I think I'm going to try cultivate this more, but it's made me realise that, effort isn't everything. There are aspects of life that just require patience. So if things don't stick right now, that's fine, maybe all you need is time.

Tools

General

Research

Diagramming

╭──────────────────────────────╮
│ ◎ ○ ○ ░░░░  Title  ░░░░░░░░░░│
├──────────────────────────────┤
│                              │
│                              │
│     Diagramming using        │
│        Monodraw!             │
│                              │
│                              │
│                              │
│                              │
└──────────────────────────────┘

TIL - AWS Summit - Fargate Autoscaling

Fargate supports autoscaling options that include FARGATE or FARGATE_SPOT for spot pricing.

TIL - AWS Summit - Eventbridge

Eventbridge can translate a lot of useful internal Amazon events into a call to say a Lamdba so you can drive custom behaviour from those events. For example: high vulnerabilities in your pushed ECR image could trigger lambda to fire off an alert(or delete the image).

TIL - AWS Summit - ECR

ECR supports vulnerability scanning of pushed up repo images.