Skip to content

Instantly share code, notes, and snippets.

View rfuehrer's full-sized avatar

R. Fuehrer rfuehrer

View GitHub Profile
@rfuehrer
rfuehrer / otp_html_input.html
Last active November 2, 2021 19:55
OTP HTML Input
<html>
<head>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
</head>
<body>
<div class="min-h-screen flex flex-col justify-center text-center">
<!-- Make sure the following div id (OTPInput) is the same in the Javascipt -->
<form action="#" method="post">
<!-- This is the div where the otp fields are generated by Javascript -->
<div class="flex justify-center " id="OTPInput">
@rfuehrer
rfuehrer / docker-reset.sh
Created September 29, 2020 12:30
Bash script to reset/delete all docker components (images, container, volumes, networks)
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
@rfuehrer
rfuehrer / reset_github_history.sh
Last active February 25, 2020 09:03
Bash script to remove history (commits & events) from remote github repository
#!/bin/bash
DEFAULT_GITREPO=<repo-name>
DEFAULT_GITACCOUNT=<user/org-name>
DEFAULT_GITRIGHT_DELETE=
DEFAULT_GITRIGHT_CREATE=
CURRDIR=$(pwd)
echo ""
@rfuehrer
rfuehrer / git_squash_all.sh
Created February 23, 2020 19:21
Squash all Git commits with git squash-all
# source: https://www.bram.us/2020/01/16/squash-all-git-commits-with-git-squash-all/
git config --global alias.squash-all '!f(){ git reset $(git commit-tree HEAD^{tree} -m "${1:-🎉 First commit}");};f'
git squash-all
git push --force origin master
@rfuehrer
rfuehrer / openjdk_portable_downloader.sh
Last active January 26, 2020 17:53
A downloader to get a portable OpenJDK (customized "tinyMediaManager" script included)
#!/bin/bash
OVERWRITE_EXISTING=0
CLEANUP_DESTINATION=1
# relatibe path (from script location) to java storage path
DIR_DESTINATION="./java_portable"
SITE_OPENJDK="https://jdk.java.net/archive/"
# ----------------------- DO NOT EDIT BELOW THIS LINE -----------------------