Skip to content

Instantly share code, notes, and snippets.

View edgeboyo's full-sized avatar

edgeboyo

View GitHub Profile
@edgeboyo
edgeboyo / hashscript.py
Created May 14, 2021 13:36
SHA256 Encoder in python
import hashlib
import time
start_time = time.time()
s = input("Input string: ")
for i in range(1000000):
s = hashlib.sha256(s.encode()).digest().hex()
end_time = time.time()
@edgeboyo
edgeboyo / hash.py
Created January 23, 2021 21:51
Quick program for hashing file, by drag and drop
#Python 3 code to demonstrate the
# working of MD5 (byte - byte)
import hashlib
import sys
def hash(name):
cont = open(name, "rb").read()
result = hashlib.md5(cont)
@edgeboyo
edgeboyo / columnL.tex
Last active November 24, 2020 13:33
Helpful LaTeX commands
% -- new column type L
% -- allows for scaled multiline blocks of texts in regular tabular env
\newcolumntype{L}{>{\centering\arraybackslash}m{5.5cm}}
import imageio
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from skimage.transform import resize
# from IPython.display import HTML
import warnings
warnings.filterwarnings("ignore")
source_image = imageio.imread(input("Point to source picture: "))
@edgeboyo
edgeboyo / crawl.py
Created June 9, 2020 23:44
A crawler that goes through the Google Photos filedump and finds files from a certain year-only!
import os
import ntpath
from shutil import copyfile
from PIL import Image
banned = ["html", "json"]
q = []
toMove = []
q.append(input("First dir: "))
@edgeboyo
edgeboyo / JAVAFX.sublime-build
Created May 1, 2020 22:09
JavaFX sublime build and run
{
"shell_cmd": "javac --module-path %JAVAFX% --add-modules ALL-MODULE-PATH *.java && java --module-path %JAVAFX% --add-modules ALL-MODULE-PATH $file_base_name",
"selector": "source.java"
}
@edgeboyo
edgeboyo / port.sh
Created March 4, 2020 23:10
Script for OpenVPN port forwarding
if [ $# -ne 2 ]
then
echo "Usage: $(0) <port> <ip>"
fi
iptables -t nat -A PREROUTING -p tcp --dport $1 -j DNAT --to-destination $2
@edgeboyo
edgeboyo / app.yaml
Created March 4, 2020 05:22
App Engine setup for an Always-On app
# [START gae_quickstart_yaml]
runtime: nodejs10
env: standard
instance_class: F1
automatic_scaling:
min_idle_instances: 1