- Turing Machine
- CPU
- Transistors
- Bit
- Byte
- Ascii Character Encoding
- Binary
- Hexadecimal
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 curses | |
from urllib.request import urlopen | |
import json | |
from time import sleep | |
fetch_todo = lambda: json.loads(urlopen("https://jsonplaceholder.typicode.com/todos").read()) | |
stdscr = curses.initscr() | |
curses.noecho() |
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
from pathlib import Path | |
generator = Path().iterdir() | |
print(generator) # generatorx98e1c | |
print(sorted(generator)) # [PurePath(".bashrc"), PurePath(".vimrc")] |
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
# pip install pyyaml | |
import yaml | |
with open("config.yaml", "r") as f: | |
data = yaml.safe_load(f) | |
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
from prompt_toolkit import prompt, HTML | |
from prompt_toolkit import print_formatted_text as print | |
from prompt_toolkit.application import run_in_terminal | |
from prompt_toolkit.key_binding import KeyBindings | |
from prompt_toolkit.lexers import PygmentsLexer | |
from prompt_toolkit.styles import Style | |
from prompt_toolkit.completion import NestedCompleter | |
from prompt_toolkit.validation import Validator, ValidationError | |
from os import getcwd |
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 TERM=vt100 |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "PublicReadGetObject", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": [ | |
"s3:GetObject" | |
], |
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
podman run -it --rm -v /var/data:/sqm --security-opt label=disable docker.io/library/alpine sh | |
# OR | |
podman run -it --rm -v /var/data:/sqm:z docker.io/library/alpine sh # secure way |
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
[kubernetes] | |
name=Kubernetes | |
baseurl=https://pkgs.k8s.io/core:/stable:/v1.28/rpm/ | |
enabled=1 | |
gpgcheck=1 | |
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.28/rpm/repodata/repomd.xml.key |
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
#include <stdarg.h> | |
// END - Error and Die | |
void end(const char *fmt, ...) { | |
va_list ap; | |
va_start(ap, fmt); | |
vfprintf(stdout, fmt, ap); | |
fprintf(stdout, "\n"); | |
fflsuh(stdout); | |
va_end(ap); |