Skip to content

Instantly share code, notes, and snippets.

View ThatCoolCoder's full-sized avatar

ThatCoolCoder

View GitHub Profile
@ThatCoolCoder
ThatCoolCoder / settings.json
Created October 16, 2023 00:57
Make latex sections bold in vscode
{
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": ["meta.function.section.section.latex", "meta.function.section.subsection.latex"],
"settings": {
"fontStyle": "bold",
}
}
]
@ThatCoolCoder
ThatCoolCoder / number_to_indonesian.py
Last active June 25, 2022 08:15
Indonesian number converter, eg 123 -> seratus dua puluh tiga. Works up to 10^100 - 1. Created out of boredeom. Maybe I should port it to JS.
ZERO = 'nol'
ONE_SHORTHAND = 'se'
TEN = 'puluh'
TEEN = 'belas'
HUNDRED = 'ratus'
DIGIT_TO_WORD = {
'1' : 'satu',
'2' : 'dua',
'3' : 'tiga',
'4' : 'empat',
@ThatCoolCoder
ThatCoolCoder / scrambler.py
Last active February 6, 2022 01:49
Thnig that scrambles wdors eexpct for the fsirt and last ltteers. (tihs decrsiption is epaxlme opuutt)
#!/usr/bin/python3
# Example usage: cat in.txt | ./scrambler.py > out.txt
# echo "My text here" | ./scrambler.py | cat
import random
import string
import sys
def scramble_word(word: str):
@ThatCoolCoder
ThatCoolCoder / settings.json
Last active January 7, 2022 23:54
VSCode bracket colouring that looks like the extension (paste into settings.json)
"editor.bracketPairColorization.enabled": true,
"editor.matchBrackets":"always",
"workbench.colorCustomizations": {
"editorBracketHighlight.foreground1": "#FFD900",
"editorBracketHighlight.foreground2": "#D96FD5",
"editorBracketHighlight.foreground3": "#87CEFA",
"editorBracketHighlight.unexpectedBracket.foreground": "#ff0000",
},
@ThatCoolCoder
ThatCoolCoder / auto_webcam.py
Created August 15, 2021 03:14
A little program to automatically capture video from a webcam for a set amount of time. Features configurable frame rate and ability to shutdown when finished. Actually made so I can see what I do in my sleep.
import pygame.camera
import pygame.image
import moviepy.video.io.ImageSequenceClip
import os.path
import time
import shutil
import sys
import re
import platform
@ThatCoolCoder
ThatCoolCoder / equationPlotter.py
Created August 11, 2020 00:26
Plot an equation (inputted as a string) on a graph. Go from start value to end value, incrementing by increment. An example equation would be 'sin(x)'
import matplotlib.pyplot as plt
from math import *
def plotEquation(equation, start=0, end=10, increment=0.1):
inputs = []
results = []
i = start
while i <= end:
inputs.append(i)
x = i