Skip to content

Instantly share code, notes, and snippets.

@exchgr
exchgr / Dockerfile
Last active March 16, 2023 15:04
containerized native yarn berry cross-compilation from amd64 on github actions to arm64 for use on aws ecr and eks running graviton nodes
FROM --platform=$BUILDPLATFORM node:18-alpine AS builder
WORKDIR /app
ENV NODE_ENV=production
RUN apk add build-base
ARG TARGETARCH
ENV npm_config_arch=$TARGETARCH
COPY yarn.lock .
@exchgr
exchgr / reverse_and_replace_audio.sh
Created July 4, 2022 23:06
reversing and replacing audio to fool apple music matching
reverseArtist() {
`which ls` . | parallel reverseAlbum {};
}
export -f reverseArtist
reverseAlbum() {
for path in "$@"; do
mkdir -p reverse/"${path}";
for track in "${path}"/*.mp3; do
@exchgr
exchgr / proper_nav.css
Created February 12, 2015 21:44
A proper nav
body {
font-family: Helvetica;
}
ul#nav {
padding: 0;
background-color: #eee;
width: 100px;
}
@exchgr
exchgr / .spring.rb
Last active August 29, 2015 14:13
Fix `~/.irbrc` and `./Gemfile.dev` in `spring`
# Read in the bash environment, after an optional command.
# Returns Array of key/value pairs.
def bash_env(cmd=nil)
env = `#{cmd + ';' if cmd} printenv`
env.split(/\n/).map {|l| l.split(/=/)}
end
# Source a given file, and compare environment before and after.
# Returns Hash of any keys that have changed.
def bash_source(file)
@exchgr
exchgr / keybase.md
Last active August 29, 2015 13:57
Keybase proof

Keybase proof

I hereby claim:

  • I am exchgr on github.
  • I am exchgr (https://keybase.io/exchgr) on keybase.
  • I have a public key whose fingerprint is 64AA 0221 7C61 4090 9701 8522 E1C0 0DFA 207B 1B4B

To claim this, I am signing this object: