Skip to content

Instantly share code, notes, and snippets.

View maxfire2008's full-sized avatar

Max Burgess maxfire2008

View GitHub Profile
#include <stdio.h>
int examplefunction(int input) {
return input * 22;
}
@maxfire2008
maxfire2008 / dvdsplit.py
Created July 6, 2021 06:06
Split File based on DVD chapters
import os
filetosplit = input("File To Split: >>") # Input file such as "FullMovie.mp3"
listOfTimes = open(input("times file: >>"),"rb").read().decode().split("\n") # List of times from DVD Decrypter > Information File > Chapter - OGG
zeroPadding = int(input("How much to pad with zeros: >>")) # 2 = 03, 5 = 00003 etc
def padZeros(x,p):
return ((p-len(str(x)))*"0")+str(x)
times = []
for i in range(len(listOfTimes)):
@maxfire2008
maxfire2008 / Harry Potter and the Goblet of Fire.md
Last active July 6, 2021 07:06
Names for Movie Chapters (Scene Select)

Harry Potter and the Goblet of Fire

  1. The Riddle House
  2. The Portkey
  3. The Quidditch World Cup
  4. The Dark Mark
  5. Beauxbatons and Durmstrang
  6. Mad-Eye Moody
  7. The Unforgivable Curses
  8. The Goblet of Fire
  9. Dark Forces Dicussed
@maxfire2008
maxfire2008 / spoiler.py
Last active August 12, 2021 23:44
Annoying Spoiler Discord
print("||"+"||||".join(list(input("Spoiler Text\n>")))+"||")
@maxfire2008
maxfire2008 / 00-12.txt
Created August 13, 2021 00:00
Discord Spoiler Rickroll
||W||||e||||'||||r||||e|||| ||||n||||o|||| ||||s||||t||||r||||a||||n||||g||||e||||r||||s|||| ||||t||||o|||| ||||l||||o||||v||||e||
||Y||||o||||u|||| ||||k||||n||||o||||w|||| ||||t||||h||||e|||| ||||r||||u||||l||||e||||s|||| ||||a||||n||||d|||| ||||s||||o|||| ||||d||||o|||| ||||I||
||A|||| ||||f||||u||||l||||l|||| ||||c||||o||||m||||m||||i||||t||||m||||e||||n||||t||||'||||s|||| ||||w||||h||||a||||t|||| ||||I||||'||||m|||| ||||t||||h||||i||||n||||k||||i||||n||||g|||| ||||o||||f||
||Y||||o||||u|||| ||||w||||o||||u||||l||||d||||n||||'||||t|||| ||||g||||e||||t|||| ||||t||||h||||i||||s|||| ||||f||||r||||o||||m|||| ||||a||||n||||y|||| ||||o||||t||||h||||e||||r|||| ||||g||||u||||y||
||I|||| ||||j||||u||||s||||t|||| ||||w||||a||||n||||n||||a|||| ||||t||||e||||l||||l|||| ||||y||||o||||u|||| ||||h||||o||||w|||| ||||I||||'||||m|||| ||||f||||e||||e||||l||||i||||n||||g||
||G||||o||||t||||t||||a|||| ||||m||||a||||k||||e|||| ||||y||||o||||u|||| ||||u||||n||||d||||e||||r||||s||||t||||a||||n||||d||
||N||||e||||v||||e||||r||||
@maxfire2008
maxfire2008 / getngrok.py
Created October 23, 2021 00:35
ngrok get url
# Prints ngrok.io tunnel name and port for miencarft to stdout
import os
import requests
os.system("pgrep -x ngrok > /dev/null && echo > /dev/null || ngrok tcp 25565 > /dev/null &")
print(json.loads(requests.get("http://127.0.0.1:4040/api/tunnels").content)["tunnels"][0]["public_url"])
@maxfire2008
maxfire2008 / lcm.py
Last active November 1, 2021 02:09
Find lowest common multiple for a given number
import random
while True:
numbers_str = input("Enter a number to find the LCM for (csv):")
if not numbers_str:
break
numbers_int = []
for number in numbers_str.split(","):
numbers_int.append(int(number))
current = 1
while True:
@maxfire2008
maxfire2008 / primegen.py
Last active November 11, 2021 22:57
prime generator
# curl -L https://gist.githubusercontent.com/maxfire2008/d9a1f8aa0494031d8100b06f89b2fdc7/raw/ --output primegen_d9a1f8aa0494031d8100b06f89b2fdc7.py && python3 primegen_d9a1f8aa0494031d8100b06f89b2fdc7.py
import random
def primeCheck(n):
if n == 1 or n == 0 or (n % 2 == 0 and n > 2):
return False
else:
for o in range(3, int(n ** (1 / 2)) + 1, 2):
if n % o == 0:
return False
@maxfire2008
maxfire2008 / genamid.py
Last active December 21, 2021 02:01
pyramid generator
import random
def leftside(o,c):
if type(o) == str:
o = [o]
for x in range(c):
print(random.choice(o)*(x+1))
def centered(o,c,sc,ditchright=True):
if type(o) == str:
o = [o]
maxlength = c
@maxfire2008
maxfire2008 / mssng.py
Created November 21, 2021 06:42
Minecraft Snapshot Style Name Generator
f"{str(exec('import datetime'))[0:0]}{datetime.datetime.now().isocalendar().year-2000}w{(1-(min(int(datetime.datetime.now().isocalendar().week/10),1)))*'0'}{datetime.datetime.now().isocalendar().week}"