Skip to content

Instantly share code, notes, and snippets.

Ryan Parman skyzyx

Block or report user

Report or block skyzyx

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@skyzyx
skyzyx / irrationality.md
Last active Oct 4, 2019
Dumb, small things that irritate me for completely irrational reasons.
View irrationality.md

Dumb, small things that irritate me for completely irrational reasons: a living list

Inspired by Michael Lopp (author of Managing Humans and Being Geek), from the podcast episode “The One About Manager READMEs” from The Important Thing podcast.

Continually updated.

  • [Writing] Double-spaces after periods. This is leftover from the typewriter days.
  • [Writing] People who use .. (which isn't a thing) instead of a proper ellipsis, , or three periods (the "poor man's" ellipsis), ....
  • People who use the word irregardless.
  • People who say "off of" instead of "on". It's not based off of, it's _based
@skyzyx
skyzyx / homebrew-gnubin.md
Last active Nov 8, 2019
Using GNU command line tools in macOS instead of FreeBSD tools
View homebrew-gnubin.md

macOS is a Unix, and not built on Linux.

I think most of us realize that macOS isn't a Linux OS, but what that also means is that instead of shipping with the GNU flavor of command line tools, it ships with the FreeBSD flavor. As such, writing shell scripts which can work across both platforms can sometimes be challenging.

Homebrew

Homebrew can be used to install the GNU versions of tools onto your Mac, but they are all prefixed with "g" by default.

All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc.

@skyzyx
skyzyx / rca.md
Last active Feb 1, 2019
Internal (not customer-facing) Root Cause Analysis (aka Post-Mortem) template
View rca.md

[20XX-XX-XX] Service Name downtime

  • This is a blameless Post-mortem.
  • We will not focus on the past events as they pertain to "could've", "should've", etc.
  • All follow up action items will be assigned to a team/individual before the end of the meeting.
  • If the item is not going to be top priority leaving the meeting, don't make it a follow up item.

| | |

@skyzyx
skyzyx / spf.md
Last active Feb 16, 2019
SPF records
View spf.md

Once upon a time, my company faced an issue: We were trying to send emails via so many third-party services (Google Apps, Sendmail, Amazon SES, Marketo, various other tools), that we exceeded the SPF-mandated DNS lookup limit by several, causing many of our emails to be flagged as spam.

Here was the problem I needed to solve:

  1. Starting with a top level domain, fetch the SPF records for the domain.

  2. Results will include a blend of include:, ip4:, or ip6: statements.

  3. We want to collect all IP statements as a unique, flattened List.

@skyzyx
skyzyx / gist:9fb1a4d2cd1d2537f414aa709d04e279
Created Oct 14, 2018
Downsample to AAC 2-channel audio
View gist:9fb1a4d2cd1d2537f414aa709d04e279
ffmpeg -i $INPUT -c:v copy -af "pan=stereo|FL < 1.0*FL + 0.707*FC + 0.707*BL|FR < 1.0*FR + 0.707*FC + 0.707*BR" -vol 512 -movflags +faststart $OUTPUT
@skyzyx
skyzyx / ecs-host-status.sh
Created Sep 15, 2018
Check the launch status of the underlying EC2 instances in an ECS cluster.
View ecs-host-status.sh
##
# Requires:
# * AWS Unified CLI Tools
# * jq
##
cluster_name="name-of-ecs-cluster"
aws ec2 describe-instance-status \
--instance-ids $(
@skyzyx
skyzyx / reflog.sh
Created Sep 4, 2018
Prune large, already-deleted files from your Git history.
View reflog.sh
wget http://repo1.maven.org/maven2/com/madgag/bfg/1.13.0/bfg-1.13.0.jar -O ~/bin/bfg.jar
git clone git@github.com:{org}/{repo}.git
cd {repo}
java -jar ~/bin/bfg.jar --strip-blobs-bigger-than 100k --protect-blobs-from {branch}
git reflog expire --expire=now --all && git gc --prune=now --aggressive
git push --force
@skyzyx
skyzyx / single.html
Last active Oct 29, 2019
Hugo Partial for Generating the Table of Contents
View single.html
...
{{- partial "toc.html" . -}}
...
@skyzyx
skyzyx / ffmpeg.sh
Last active Aug 26, 2018
Compile FFMPEG with everything (including MP4 → Animated WebP support)
View ffmpeg.sh
brew install ffmpeg \
--with-chromaprint \
--with-fdk-aac \
--with-fontconfig \
--with-freetype \
--with-frei0r \
--with-game-music-emu \
--with-libass \
--with-libbluray \
--with-libbs2b \
@skyzyx
skyzyx / webp-build.sh
Created Aug 24, 2018
Build all of the binaries for the WebP CLI tools.
View webp-build.sh
#! /usr/bin/env bash
rm -Rf /tmp/libwebp && \
git clone https://github.com/webmproject/libwebp.git /tmp/libwebp && \
mkdir -p /tmp/libwebp/build && \
cd /tmp/libwebp/build && \
cmake -DWEBP_ENABLE_SIMD=ON -DWEBP_BUILD_CWEBP=ON -DWEBP_BUILD_DWEBP=ON -DWEBP_BUILD_GIF2WEBP=ON -DWEBP_BUILD_IMG2WEBP=ON -DWEBP_BUILD_WEBPINFO=ON -DWEBP_NEAR_LOSSLESS=ON ../ && \
make && \
make install
You can’t perform that action at this time.