Forcing a specific CA chain
When a CA has its certificates removed from public trust (as happened today), applications don’t always know immediately. TLDR Just set …
When a CA has its certificates removed from public trust (as happened today), applications don’t always know immediately. TLDR Just set …
It’s sometimes needed to delete calendar events owned by someone else, for example if they’ve left the organisation. Note This only works …
When looking through a sea of stats, it’s hard to find which metrics are consuming the most data (especially when billed by series). With a list …
When rebasing commits, it’s common that the author date gets reset (since you’re re-authoring the commit). Simon Willison’s solution …
IAM policies can have a Condition, which must pass for the policy to apply. This can be used to require HTTPS and/or the TLS version: { …
Sometimes, you only have access to the aws CLI, and need to generate presigned URLs to S3 objects. The aws s3 presign command will do this, creating …
The official AWS CLI installation steps require downloading and running a script to install the CLI. This download contains the CLI itself, and the …
The ability to create personal access tokens without expiry was deprecated in GitLab 15.4 and removed in GitLab 16.0. For security reasons, expiring …
Optimising images is a fairly well understood problem, with lots of different solutions and tools. Images can be resized, their pixels grouped, or …
If everything you run is already in Heroku, it can be useful to run even simple scheduled tasks there too, to save integrating and running services on …
Some of my notes don’t have headings. Others have barely any. However, the Table of Contents area used to take up a large area of screen for no …
During release, it’s possible to consume so much memory, Heroku kills the dyno before it finishes executing. heroku[release.xxxx]: Process …
To copy bucket contents from a bucket in account A to a bucket in account B: Create new S3 bucket in account B Create IAM role / user in account B, …
The sidebar for this notes site used to use tags for the hierarchy, rather than by the filesystem structure. This works by retrieving the tags for …
When making a query with lots of columns, it can become so wide that it wraps, making the results incredibly difficult to read. To combat this, you …
$ unset HISTFILE or: $ set +o history Clear history $ history -c
It’s often useful to view what Redis is working on. Connect to redis MONITOR
It’s often useful to get regular access keys as if you were assumed into another role. This is possible: aws sts assume-role --role-arn …
ls -1 *.mp4 | xargs -I{} ffmpeg -y -i {} -ac 2 -c:v copy /path/to/out/{} Downmixes multi-channel audio into stereo. Reduces the chances of weird …
rename 's/<in_re>/<out_re>/g' * Useful options: -v: List files renamed -n: Dry-run -d: Act just on the filename
This uses mitmproxy, which can proxy both HTTP and HTTPS. $ mitmproxy --mode reverse:http://localhost:8000
Running queries View a list of queries running longer than 5 minutes: SELECT pid, now() - pg_stat_activity.query_start AS duration, query, state FROM …
View a list of running queries: SELECT datname, pid, usename, client_addr, client_port, xact_start, backend_start, query_start, state, query FROM …
$ git rebase --onto master server client Take the client branch, figure out the patches since it diverged from the server branch, and replay these …
How to delete database from the inside, with only access to that database. The primary way this works is by using pg_dump’s ability to drop a …
$ ls -1 *.mp4 | xargs -I{} ffmpeg -y -i {} -map 0 -map -0:a:0 -c copy /path/to/out/{} -map -0:a:0 removes the 0th audio stream. v - video, such as …
*.md linguist-detectable=true *.sql linguist-detectable=true To force detection as a specific language: *.sql linguist-language=sql