Skip to content

Instantly share code, notes, and snippets.

View wilhelm-murdoch's full-sized avatar
💀
Busy being spoopy.

Wilhelm Murdoch wilhelm-murdoch

💀
Busy being spoopy.
View GitHub Profile
@susam
susam / beeper.log
Last active February 1, 2022 10:22
;;;; Beeper: See <https://news.ycombinator.com/item?id=30146451> for details.
;;;; Script: while true; do (echo ok | nc -q 1 -vlp 8000 2>&1; echo; date -u) | tee -a beeper.log; for i in 1 2 3 4; do printf '\a'; sleep 1; done & done
;;;; Filter: grep -a '^[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] UTC [2-9][0-9][0-9][0-9]$' beeper.log
;;;; Started: 2022-01-31 10:14:00 UTC
;;;; Stopped: 2021-02-01 10:14:00 UTC
;;;; Connects: 4761
;;;; Beeps: 19044
Mon Jan 31 10:14:12 UTC 2022
Mon Jan 31 10:16:47 UTC 2022
@wilhelm-murdoch
wilhelm-murdoch / spongebob
Last active October 22, 2021 13:07
Convert text to "spongebob' format from your command line ...
#!/usr/bin/env bash
set -eo pipefail
[[ -n "${VERBOSE}" ]] && set -x
read text
while [[ $index -lt "${#text}" ]]; do
swap=$(( $RANDOM % 10 ))
@wilhelm-murdoch
wilhelm-murdoch / keybase.md
Created November 7, 2020 03:41
keybase.md

Keybase proof

I hereby claim:

  • I am wilhelm-murdoch on github.
  • I am wilhelm (https://keybase.io/wilhelm) on keybase.
  • I have a public key ASBZm_maWfr3d882kURWC8C-i0iQFkBeuNWDtW2xi6sPxgo

To claim this, I am signing this object:

@ipmb
ipmb / Dockerfile
Last active July 12, 2024 07:50
amazon-ssm-agent Dockerfile
FROM golang:1.12-alpine as builder
ARG VERSION=2.3.930.0
RUN set -ex && apk add --no-cache make git gcc libc-dev curl bash && \
curl -sLO https://github.com/aws/amazon-ssm-agent/archive/${VERSION}.tar.gz && \
mkdir -p /go/src/github.com && \
tar xzf ${VERSION}.tar.gz && \
mv amazon-ssm-agent-${VERSION} /go/src/github.com/amazon-ssm-agent && \
cd /go/src/github.com/amazon-ssm-agent && \
echo ${VERSION} > VERSION && \
gofmt -w agent && make checkstyle || ./Tools/bin/goimports -w agent && \
@wilhelm-murdoch
wilhelm-murdoch / list.sh
Last active October 22, 2021 13:07
List all unused security groups in all AWS regions ...
#!/usr/bin/env bash
set -eo pipefail
[[ -n "${VERBOSE}" ]] && set -x
for region in $(aws ec2 describe-regions | jq -r '.Regions[].RegionName'); do
for sg in $(aws ec2 describe-security-groups --region="${region}" | jq -r '.SecurityGroups[].GroupId'); do
if [[ $(aws ec2 describe-network-interfaces --region="${region}" --filters Name=group-id,Values="${sg}" | jq -r '.NetworkInterfaces | length') -eq 0 ]]; then
echo "${sg} in ${region}"
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active September 20, 2024 18:08
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@sdondley
sdondley / tmux split-window subcommand.md
Last active September 13, 2024 13:31
Super Guide to the split-window tmux Subcommand (and Beyond)

Super Guide to the split-window tmux Subcommand (and Beyond)

Guide overview

tmux, like other great software, is deceptive. On the one hand, it's fairly easy to get set up and start using right away. On the other hand, it's difficult to take advantage of tmux's adanced features without spending some quality alone time with the manual. But the problem with manuals is that they aren't geared toward beginners. They are geared toward helping seasoned developers and computer enthusiasts quickly obtain the

@wilhelm-murdoch
wilhelm-murdoch / cidr.py
Last active October 22, 2021 13:08
Ensure given VPC subnets have zero overlap.
#!/usr/bin/env python
import ipaddr
accounts = {
'flood-beta': {
'public': [
'10.1.32.0/20',
'10.1.96.0/20',
'10.1.160.0/20'
@leonardofed
leonardofed / README.md
Last active September 19, 2024 07:07
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@kracekumar
kracekumar / Writing better python code.md
Last active February 19, 2024 03:06
Talk I gave at June bangpypers meetup.

Writing better python code


Swapping variables

Bad code