Skip to content

Instantly share code, notes, and snippets.

View brakkum's full-sized avatar
💻
Developer at mPulse Mobile in Minneapolis, MN

brakkum

💻
Developer at mPulse Mobile in Minneapolis, MN
View GitHub Profile
import re
def get_new_board():
# board[row][column]
return [["" for _ in range(7)] for _ in range(6)]
t = {
"Red": "R",
@brakkum
brakkum / generate_bad_calculator.py
Created November 9, 2019 15:18
Generate a horrible Python calculator
# make a shitty python calculator
with open("./bad_calc.py", "a+") as out_file:
out_file.write("num1 = int(input('enter a number '))\n")
out_file.write("num2 = int(input('enter another number '))\n")
out_file.write("operator = input('what operator? (+, -, /, *) ')\n")
out_file.write("\n")
operators = ["+", "-", "/", "*"]
from moviepy.editor import VideoFileClip, vfx
from PIL import Image
import imageio
import shutil
import imghdr
import numpy
import rawpy
import time
import sys
import os
@brakkum
brakkum / recursive_image_duplication.py
Last active November 12, 2019 06:33
A Python script that is supplied a directory, and recursively goes through said directory and compresses all photos/videos it finds of types specified in file.
from moviepy.editor import VideoFileClip, vfx
from PIL import Image
import imageio
import shutil
import imghdr
import numpy
import rawpy
import time
import sys
import os
@brakkum
brakkum / ytmndText.js
Last active March 3, 2023 22:25
A function that creates old-school YTMND style text within a given HTML element. You supply the text, element to use, and distance from top of page in px.
ytmndText = (text, el_id = "zoom_text", top = 250) => {
let text_box = document.getElementById(el_id);
for (let i = 1; i <= 30; i++) {
let color_val = i === 30 ? 0 : i * 8;
let text_shadow = i === 30 ? "-1px 0 white, 0 1px white, 1px 0 white, 0 -1px white" : "none";
let new_div = `
<div
style="
@brakkum
brakkum / readme.md
Last active March 24, 2018 23:01
Getting Setup for Symfony with Laravel/Homestead from scratch

Hello!

This is a quide to how I got setup with Symfony step by step while using Homestead. This is written from a total amateur perspective, so I will do my best to include all steps I took, even the bad ones.

The first step is to install Homebrew using Terminal to allow us to easily download and manage some packages we need.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Now we'll grab Cask using Homebrew. Cask is an extension to Homebrew that allows us to get some more graphical applications. The 'brew tap' command just allows us to access other repositories.