Skip to content

Instantly share code, notes, and snippets.

View metcalfc's full-sized avatar

Chad Metcalf metcalfc

View GitHub Profile
@metcalfc
metcalfc / ziggy.ps1
Last active March 12, 2024 21:58
Get a version of Zig for Windows.
<#
.SYNOPSIS
This script downloads and installs the specified version of zig.
.DESCRIPTION
The script downloads the specified version of zig from https://ziglang.org, extracts it into the user's home directory, and optionally adds it to the PATH.
.PARAMETER version
The version of zig to download. If not specified, the script downloads the master version.
@metcalfc
metcalfc / update-sample.sh
Last active December 22, 2023 23:51
Update the Daytona Sample Index
#!/bin/bash
# https://blog.mdminhazulhaque.io/extract-patch-file-configmap
URL="https://raw.githubusercontent.com/daytonaio/samples-index/main/index.json"
# parse the arguments for --url
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
-u|--url)
#!/usr/bin/env python3
import math
image_sizes = [10, 100, 250, 500, 1000]
pull_counts = [10, 100, 1000, 10000, 100000, 1000000]
free_bw = 10 * 1024
cost_gb = 0.5
@metcalfc
metcalfc / # git - 2020-07-28_08-39-07.txt
Created July 28, 2020 15:43
git on Ubuntu 18.04.4 LTS - Homebrew build logs
Homebrew build logs for git on Ubuntu 18.04.4 LTS
Build date: 2020-07-28 08:39:07
@metcalfc
metcalfc / ACNH.json
Created July 24, 2020 18:41
Kayla Cinnamon's Animal Crossings New Horizons Windows Terminal Colorscheme
{
"name": "ACHN",
"background": "#0a85d9",
"black": "#282a2e",
"blue": "#1f415c",
"brightBlack": "#373b41",
"brightBlue": "#8bcaff",
"brightCyan": "#4de0cc",
"brightGreen": "#bbd627",
"brightPurple": "#df9af4",
@metcalfc
metcalfc / fix.sh
Created July 10, 2020 03:55 — forked from tkhduracell/fix.sh
Fix locale on raspberry pi (raspbian) "Setting locale failed."
#
# How to get rid of the locale warning on raspberry pi
#
sudo sed -i "s/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g" -i /etc/locale.gen
sudo locale-gen en_US.UTF-8
sudo update-locale en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
#!/bin/sh
if ! command -v curl &> /dev/null
then
echo "We'll need curl which could not be found"
exit
fi
if ! command -v jq &> /dev/null
then
@metcalfc
metcalfc / docker-compose.yml
Last active July 22, 2020 17:15
composer-docker-ecs-compose
services:
backend:
image: redis@sha256:6972ee00fd35854dd2925904e23cb047faa004df27c62cba842248c7db6bd99d
frontend:
depends_on:
- backend
image: metcalfc/timestamper@sha256:49e46611d6460720282f9a1df4f418b78b453eb238e38afa1a18f05ff0691bbb
ports:
- 5000:5000
x-aws-pull_credentials: arn:aws:secretsmanager:us-west-2:175142243308:secret:DockerHubAccessToken-8cRLae
@metcalfc
metcalfc / docker-compose.yml
Created July 2, 2020 17:51
composer-composer
services:
backend:
image: redis@sha256:b7561e4e994ab52cb2062b9c3e943ab2af3287caf9d9aeb6719acc77013769a5
frontend:
depends_on:
- backend
image: metcalfc/myexample@sha256:82d54bfffb6f6d4e7a648b3927fc86df34217eb132ce737d1d9830d61266dcdd
ports:
- 5000:5000
version: '3.8'
services:
backend:
image: redis@sha256:b7561e4e994ab52cb2062b9c3e943ab2af3287caf9d9aeb6719acc77013769a5
frontend:
depends_on:
- backend
image: metcalfc/myexample@sha256:82d54bfffb6f6d4e7a648b3927fc86df34217eb132ce737d1d9830d61266dcdd
ports:
- 5000:5000
version: '3.8'