Skip to content

Instantly share code, notes, and snippets.

View LevitatingBusinessMan's full-sized avatar
🕴️
Ricing my polybar...

Rein Fernhout LevitatingBusinessMan

🕴️
Ricing my polybar...
View GitHub Profile
@LevitatingBusinessMan
LevitatingBusinessMan / README.md
Last active February 10, 2019 22:46
Game of Life

The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970.

The game is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves, or, for advanced players, by creating patterns with particular properties.

Rules:

  1. Any live cell with fewer than two live neighbors dies, as if by underpopulation.
  2. Any live cell with two or three live neighbors lives on to the next generation.
  3. Any live cell with more than three live neighbors dies, as if by overpopulation.
  4. Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.
@LevitatingBusinessMan
LevitatingBusinessMan / index.html
Last active February 18, 2019 15:11
3 Word Password Generator
<!DOCTYPE html>
<html>
<head>
<title>3 Word Password</title>
<link rel="icon" href="lock-black.png" type="image/x-icon"/>
<link rel="stylesheet" href="/style.css">
</head>
<body>
<!-- Lock icon by Those Icons https://www.flaticon.com/authors/those-icons-->
<img id="lock" src="lock.png"/>
@LevitatingBusinessMan
LevitatingBusinessMan / blue_yt.css
Last active April 10, 2019 01:48
Blue Youtube
:root {
--main-color: #0099ff;
}
/*progress bar (player)*/
.ytp-swatch-background-color,
/*playback progress bar*/
#progress.ytd-thumbnail-overlay-resume-playback-renderer,
/*HD tag settings icon (player)*/
.ytp-settings-button.ytp-hd-quality-badge:after, .ytp-settings-button.ytp-4k-quality-badge:after, .ytp-settings-button.ytp-5k-quality-badge:after, .ytp-settings-button.ytp-8k-quality-badge:after,
def pigLatin(input = "Pig Latin")
input = input.downcase
result = []
for word in input.split(" ") do
#First character is a vowel
if ["a", "e", "i", "o", "u"].include?(word[0])
result.push word + "ay"
@LevitatingBusinessMan
LevitatingBusinessMan / solver.js
Last active September 9, 2019 09:57
Math class was boring so I spend my time making this instead
if (process.argv.length < 3)
return console.log("No equation defined")
const equation = process.argv[2]
if (!equation.includes("=") || !equation.includes("x"))
return console.log("Not a valid equation")
const firstHalf = equation.split("=")[0]
const secondHalf = equation.split("=")[1]
@LevitatingBusinessMan
LevitatingBusinessMan / bruteforce.js
Created September 9, 2019 10:26
Did a programming battle against a friend who could design this program the quickest
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
const maxLength = 10;
const indeces = [0];
while (indeces.length < maxLength) {
let string = ""
for (let i = 0; i < indeces.length; i++) {
string += chars[indeces[i]]
#!/usr/bin/node
const program = require("commander");
const net = require("net");
let host;
program
.usage("[options] <host>")
.arguments("<host>")
.option("-p, --port <port>", "specify port")
@LevitatingBusinessMan
LevitatingBusinessMan / sloris.py
Created November 7, 2019 14:08
Slow Loris in Python
#! /usr/bin/python
import socket
import time
from threading import Timer
target = "127.0.0.1"
port = 80
maxSockets = 700
ka_timeout = 10
socket_timeout = 2
@LevitatingBusinessMan
LevitatingBusinessMan / index.html
Last active November 14, 2019 23:08
Pornhub Logo Creator
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Pornhub Logo Creator</title>
</head>
<body>
<div id="logo-container">
<div contenteditable="true" id="porn" class="logo">Type</div>
<div contenteditable="true" id="hub" class="logo">Here</div>
#! /usr/bin/python3
import sys
import requests
#import curses
import atexit
""" def reset_curses():
curses.endwin() """