Skip to content

Instantly share code, notes, and snippets.

View price.py
#!/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 Jul 28, 2020
git on Ubuntu 18.04.4 LTS - Homebrew build logs
View # git - 2020-07-28_08-39-07.txt
Homebrew build logs for git on Ubuntu 18.04.4 LTS
Build date: 2020-07-28 08:39:07
@metcalfc
metcalfc / ACNH.json
Created Jul 24, 2020
Kayla Cinnamon's Animal Crossings New Horizons Windows Terminal Colorscheme
View ACNH.json
{
"name": "ACHN",
"background": "#0a85d9",
"black": "#282a2e",
"blue": "#1f415c",
"brightBlack": "#373b41",
"brightBlue": "#8bcaff",
"brightCyan": "#4de0cc",
"brightGreen": "#bbd627",
"brightPurple": "#df9af4",
@metcalfc
metcalfc / fix.sh
Created Jul 10, 2020 — forked from tkhduracell/fix.sh
Fix locale on raspberry pi (raspbian) "Setting locale failed."
View fix.sh
#
# 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
View install-ecs-plugin.sh
#!/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 Jul 22, 2020
composer-docker-ecs-compose
View docker-compose.yml
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
View docker-compose.yml
services:
backend:
image: redis@sha256:b7561e4e994ab52cb2062b9c3e943ab2af3287caf9d9aeb6719acc77013769a5
frontend:
depends_on:
- backend
image: metcalfc/myexample@sha256:82d54bfffb6f6d4e7a648b3927fc86df34217eb132ce737d1d9830d61266dcdd
ports:
- 5000:5000
version: '3.8'
View docker-compose.yml
services:
backend:
image: redis@sha256:b7561e4e994ab52cb2062b9c3e943ab2af3287caf9d9aeb6719acc77013769a5
frontend:
depends_on:
- backend
image: metcalfc/myexample@sha256:82d54bfffb6f6d4e7a648b3927fc86df34217eb132ce737d1d9830d61266dcdd
ports:
- 5000:5000
version: '3.8'
View sshd.bat
powershell.exe "& 'C:\Windows\System32\bash.exe' -c 'sudo /etc/init.d/ssh start'"
powershell.exe "& 'C:\Windows\System32\bash.exe' -c 'sudo /home/metcalfc/bin/sudppipe.sh start'"
timeout 5
View sudppipe.ps1
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}
You can’t perform that action at this time.