Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Knox mattk42

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am mattk42 on github.
  • I am mattk42 (https://keybase.io/mattk42) on keybase.
  • I have a public key whose fingerprint is 4559 EC76 221B 075B 0AF5 DBDC B3B1 FB76 D3A5 7F95

To claim this, I am signing this object:

View gist:93230b36a99443aa60d5e0b77e52a238
INFO [firmware]: buildpack type detected. Defaulting to $PORT 5000
INFO [firmware]: buildpack type detected. Defaulting to $PORT 5000
INFO [firmware]: adding 30s on to the original 120s timeout to account for the initial delay specified in the liveness / readiness probe
INFO [firmware]: This deployments overall timeout is 150s - batch timout is 150s and there are 1 batches to deploy with a total of 3 pods
INFO [firmware]: waited 10s and 3 pods are in service
INFO [firmware]: waited 20s and 3 pods are in service
INFO [firmware]: waited 30s and 3 pods are in service
INFO [firmware-api]: buildpack type detected. Defaulting to $PORT 5000
INFO [firmware-api]: buildpack type detected. Defaulting to $PORT 5000
INFO [firmware-api]: buildpack type detected. Defaulting to $PORT 5000
View keybase.md

Keybase proof

I hereby claim:

  • I am mattk42 on github.
  • I am mattk42 (https://keybase.io/mattk42) on keybase.
  • I have a public key ASBXLF0iVWyaXb4HRqhdVHgurVUQQQ4tIqkA71lM_Eswiwo

To claim this, I am signing this object:

View advent_of_code_2020_day1_part1
#!/bin/bash
inputs="$(<$1)"
while read i
do
inputs="`echo "$inputs" | sed 1d`"
while read x
do
sum=$(($x + $i))
View advent_of_code_2020_day1_part2
#!/bin/bash
inputs="$(<$1)"
while read i
do
inputs="`echo "$inputs" | sed 1d`"
while read x
do
while read z
View advent_of_code_2020_day2_part1
#!/bin/bash
valid=0
while read line
do
min=$(echo $line | cut -d ' ' -f 1 | cut -d '-' -f 1)
max=$(echo $line | cut -d ' ' -f 1 | cut -d '-' -f 2)
char=$(echo $line | cut -d ' ' -f 2 | sed 's/://')
pass=$(echo $line | cut -d ' ' -f 3)
View advent_of_code_2020_day2_part2
#!/bin/bash
valid=0
while read line
do
first_pos=$(echo $line | cut -d ' ' -f 1 | cut -d '-' -f 1)
second_pos=$(echo $line | cut -d ' ' -f 1 | cut -d '-' -f 2)
char=$(echo $line | cut -d ' ' -f 2 | sed 's/://')
pass=$(echo $line | cut -d ' ' -f 3)
View advent_of_code_2020_day3_part1
#!/bin/bash
pos=1
line_num=0
trees=0
while read line
do
len=$(echo $line | wc -c)
char_at_pos=$(echo $line | cut -c $pos)
View advent_of_code_2020_day3_part2
#!/bin/bash
function ride_slope(){
pos=1
line_num=0
trees=0
slope_right=$1
slope_down=$2
while read line
do
View advent_of_code_2020_day4_part1
#!/bin/bash
required_fields="byr iyr eyr hgt hcl ecl pid"
while read line
do
# read through until blank line or end of file to capture a full passport
if [ -z "$line" ]
then
for field in $required_fields
do