This has updated for 1.20.4, all of the optimization mods mentioned here are compatible with each other and don't affect vanilla behaviour by default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -i | |
#using shebang with -i to enable interactive mode (auto load .bashrc) | |
set -e #stop immediately if any error happens | |
# Install Open SDK | |
apt update | |
apt install openjdk-8-jdk -y | |
update-java-alternatives --set java-1.8.0-openjdk-amd64 | |
java -version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Simple motd script for any systemd Linux (tested on Debian) | |
# Inspiration: https://superuser.com/questions/919962/landscape-sysinfo-for-centos | |
# Inspiration 2: https://github.com/thusoy/headsup/blob/master/headsup.py | |
os-name=$() | |
os-kernel=$() | |
date-today=$() | |
system-load=$() | |
processes=$(cat /proc/loadavg | cut -d"/" -f2| cut -d" " -f1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
## -----------------------------=[ WARNING ]=-------------------------------- ## | |
# | |
# This script is now woefully out of date due to which accounts ESXi allows to | |
# ssh into the box as well as sticky folders/file flags. | |
# I've since ported the whole thing to python with a lot of bells and whistles | |
# and if i get around to making it public, i'll put a link here. | |
# | |
## -------------------------------=[ Info ]=--------------------------------- ## |
running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?PHP | |
// Generates a strong password of N length containing at least one lower case letter, | |
// one uppercase letter, one digit, and one special character. The remaining characters | |
// in the password are chosen at random from those four sets. | |
// | |
// The available characters in each set are user friendly - there are no ambiguous | |
// characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option, | |
// makes it much easier for users to manually type or speak their passwords. | |
// |
Visit the new improved script here! Smooth scroll to top of page (Improved!)
If you need a plain JavaScript function to add a smooth scrolling back to the top of the page, you can use this script.
- Add an id of "top" to the
<body>
tag. Like this:<body id="top">
- Add the
onclick
function to the link. Like this:<a href="#top" onclick="scrollToTop(); return false">Back to Top ↑</a>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
aptitude -y install expect | |
// Not required in actual script | |
MYSQL_ROOT_PASSWORD=abcd1234 | |
SECURE_MYSQL=$(expect -c " | |
set timeout 10 |