Skip to content

Instantly share code, notes, and snippets.

View btkostner's full-sized avatar
🐵
IRL Chaos Monkey

Blake Kostner btkostner

🐵
IRL Chaos Monkey
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<Client name="tvOS">
<TranscodeTargets>
<VideoProfile container="mkv" codec="h264,h265,hevc,mpeg2video,mpeg4,vc1,av1" audioCodec="flac" subtitleCodec="ass,dvb_subtitle,vobsub,eia_608,pgs,microdvd,movtext,ssa,srt" />
<MusicProfile container="flac" codec="flac" />
<PhotoProfile container="jpeg" />
</TranscodeTargets>
<DirectPlayProfiles>
<VideoProfile container="mkv,mov,mp4,mpegts,mpeg,mpegvideo,avi,flv,ogg" codec="h264,h265,hevc,vp9,h263,mpeg1video,mpeg2video,mpeg4,vc1,av1" audioCodec="aac,ac3,alac,flac,eac3,dca,opus" subtitleCodec="ass,dvb_subtitle,vobsub,eia_608,pgs,microdvd,movtext,ssa,srt" />
<MusicProfile container="mp3" codec="mp3" />
@btkostner
btkostner / transform-barrel-file-imports.ts
Last active August 15, 2025 23:11 — forked from mmazzarolo/transform-barrel-file-imports.ts
Codemod to kill barrel file references
/**
* This script/codemod transforms imports from barrel files into direct imports.
* It's designed to work with jscodeshift to modify TypeScript/JavaScript files.
*
* Features:
* - Handles multiple barrel files
* - Transforms both value and type imports
* - Prefers @/ alias paths (from tsconfig paths) over ../ traversals
* - Handles re-exports within barrel files
*
@btkostner
btkostner / README.md
Last active March 22, 2024 19:34
SRE Technical Challenge

SRE Technical Challenge

This is a simple Elixir Phoenix project that needs to be deployed. The Docker image is publicly available at ghcr.io/stordco/sre-technical-challenge.

The challenge: create a Helm chart that deploys the application, including setting environment variables as defined in Values, running database migrations against a pre-existing database, and configuring probes to ensure the application is healthy.

See the Validation section for the commands that will be run to validate your Helm chart.

Note: If you are using an arm64 system (such as M1 or newer), use the image tag arm64 to run locally on Docker Desktop Kubernetes.

@btkostner
btkostner / components.ex
Created September 1, 2022 15:00
tailwind class extending
defmodule ATcmsWeb.Component do
@moduledoc """
A collection of useful functions for creating components.
"""
use Phoenix.HTML
import Phoenix.LiveView, only: [assign: 3]
@tailwind_colors ~w(white black slate gray zink neutral stone red orange
@btkostner
btkostner / README.md
Last active August 4, 2022 21:36
Elixir Telemetry AST update

Elixir Telemetry AST update

This uses the amazing sourceror to make some modifications to telemetry.ex files. Mostly, this ensures a get_and_put_http_tags/1 function exists, and that two metrics are updated. This was a quick 30 minute task, has many bugs, and is very ugly, but I still love it.

Combine this with microplane project and you have an SRE time saver (maybe) for updating multiple projects.

@btkostner
btkostner / btkostner.pub
Created April 6, 2020 21:14
A public SSH key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXqq+8iLCKo+NYK/gl9veON+UHHQY2q2ohDWIj0GNFuM9OI9U68WGrpvCmnN1uxHMgCkkDK8hRtQJ4thj39MlH6wzTOEAlNCb27UqSlMLljXPMAreQXOYXoPn99pGXMIfxkSCKEtYRju/E8saAO3Wtf+Y+GaRi5H1zORBR5UYYPKnRprD4d08gqcb9QCmJx0unsGPIBsffik0KxW/I7Z0E+R8uLHOC+fPyHQD6WQDsTvYWgrCDLsWU3M7JfjPSvAlwqtpY8FBmlWWwLxAOGvmid6oO6q1e5TmAeekx/PxU2CckZ0WcAnGcI6xNOQlSdclfjOPzSroDmDJJwFklgwvj btkostner@Caprica
@btkostner
btkostner / node.js
Last active September 15, 2017 17:15
A smooth Vue slider with touch input
/**
* node.js
* Holds useful helper functions for DOM elements.
*/
/**
* isIn
* Checks if an element is in another element
*
* @param {Node} parent - The parent the child should be in
@btkostner
btkostner / download.js
Created January 20, 2017 02:15
time series data with mongoose
/**
* lib/database/download.js
* Holds package download analytics from telemetry.
* @flow
*
* @exports {Object} schema - Mongoose schema for Download model
* @exports {Download} default - Mongoose Download model
*/
import moment from 'moment'
@btkostner
btkostner / keybase.md
Created November 1, 2016 20:06
Keybase information

Keybase proof

I hereby claim:

  • I am btkostner on github.
  • I am btkostner (https://keybase.io/btkostner) on keybase.
  • I have a public key whose fingerprint is 0028 F725 7CB9 D96B F25E 1F70 BB2B 03F9 A72E ABDE

To claim this, I am signing this object:

@btkostner
btkostner / grab.sh
Created August 1, 2016 20:12
Script to build a package of elementary appstream data
#!/bin/sh
# Creates a folder full of pantheon appstream data ready for debian packaging
# Requires bzr, wget, and tar
TEMP="/tmp/appstream-package"
LAUNCH="~elementary-os/elementaryos/appstream-data-pantheon"
# TODO: switch url to https once we get certifications working
URL="http://packages.elementary.io/daily"
DIST="xenial"