Check this if you don't know how to:
This file contains 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 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 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
creationTimestamp: null | |
labels: | |
app: nginx | |
name: nginx | |
namespace: ballista | |
spec: | |
replicas: 1 |
This file contains 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 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 |
NewerOlder