{
"ClusterName": "snail-cluster",
"ClusterArn": "arn:aws:ecs:us-west-2:123456789012:cluster/snail-cluster",
"Status": "ACTIVE",
"RegisteredContainerInstancesCount": 3,
"RunningTasksCount": 2,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import sys | |
from pathlib import Path | |
def parse_markdown_for_toc(markdown_content): | |
heading_pattern = re.compile(r'^(#{1,})\s+(.+?)(\s*)$', re.MULTILINE) | |
toc = [] | |
for match in heading_pattern.finditer(markdown_content): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
def read_binary_file_to_hex(filename): | |
with open(filename, 'rb') as binary_file: | |
data = binary_file.read() | |
hex_data = data.hex() | |
block_size = 32 | |
offset = 0 | |
for i in range(0, len(hex_data), block_size): | |
block = hex_data[i:i + block_size] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export NODE\_OPTIONS=--experimental-worker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
shuf /usr/share/dict/words | grep -E "^[a-z]{4,8}$" | head -4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################## | |
# # | |
# .foolzprompt # | |
# customized bash PS1 prompt # | |
# # | |
############################## | |
# function to detect the git branch of the current directory | |
parse_git_branch() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// score data | |
const dolphinsScores = [97, 112, 101]; | |
const koalasScores = [109, 95, 106]; | |
// helper function to average array values | |
const avgScore = (array) => | |
// array.reduce iterated through an array and adds each value together. | |
// then divide the result agaisn't the legnth of the array to get the average. | |
array.reduce((acc, val) => acc + val) / array.length; |
NewerOlder