Skip to content

Instantly share code, notes, and snippets.

View Fitzy1293's full-sized avatar

Fitzy1293

View GitHub Profile
@Fitzy1293
Fitzy1293 / .zshrc
Created June 30, 2023 15:49
Working zshrc, works!
#---------------------------------------------------------------------------------------------------------------------
# _____ _____ _____
# /\ \ /\ \ /\ \
# /::\ \ /::\ \ /::\____\
# \:::\ \ /::::\ \ /:::/ /
# \:::\ \ /::::::\ \ /:::/ /
# \:::\ \ /:::/\:::\ \ /:::/ /
# \:::\ \ /:::/__\:::\ \ /:::/____/
# \:::\ \ \:::\ \:::\ \ /::::\ \
#!/bin/env python3
from argparse import ArgumentParser
import os
from urllib.parse import parse_qsl, urlparse
import requests
from random import randint
HEADERS = {
'Connection': 'keep-alive',
@Fitzy1293
Fitzy1293 / pyalias_explainer.md
Last active January 1, 2023 10:15
pyalias.py preview

Alias viewer

A nicer way to see what aliases you're running.

Preview

Colors and stuff.

Code

@Fitzy1293
Fitzy1293 / pyalias.py
Last active December 29, 2022 22:18
pretty printing aliases
#!/bin/env python3
'''
gist: https://gist.github.com/Fitzy1293/ccacc7a4420ff4a1a42d2f97dd5e1823
'''
import sys
class Colors:
magenta = '\033[1;95m'
import cv2
import os, sys
# Each video has a frame per second which is number of frames in every second
frame_per_second = 60 # smooth as shit bo
image_folder = sys.argv[1]
tempvid = 'output.mp4'
video_output = sys.argv[2]
# go back and change this to accept any sat as an arg
'''
Started with https://github.com/nemanjastokuca/tiktok-downloader/blob/main/tiktok-downloader.py as a template.
random ukraine example: https://www.tiktok.com/@kharchuk.in/video/7068699049892891909
'''
from argparse import ArgumentParser
import os, subprocess # subprocess for ffmpeg
from urllib.parse import parse_qsl, urlparse
import requests
class MenuItem:
"""Models each Menu Item."""
def __init__(self, name, water, milk, coffee, cost):
self.name = name
self.cost = cost
self.ingredients = {
"water": water,
"milk": milk,
"coffee": coffee
}
#-------------------------------------------------------------------------------------------------------------------------------------------------------
def current_http_pid():
previously_active_pid = os.popen('ps aux | grep "python.*http.server.*8000" | head -n 1 | awk \'{ print $2 }\'').read()
return previously_active_pid
#-------------------------------------------------------------------------------------------------------------------------------------------------------
if __name__ == '__main__':
markdown_string = markdown_blog_text()
run_html_update(markdown_string)
@Fitzy1293
Fitzy1293 / main.py
Created August 14, 2021 18:48
Calibre script
import subprocess
import os
import argparse
parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('-c,', '--convert', dest='CONVERT_TYPE', help='filetype to convert to')
ARGS = parser.parse_args()
def convert_to_other_ebook_format(input_ebook, output_format):