This file contains 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
# New session | |
tmux new -s tunnel | |
# New window | |
C-b c | |
# Close window | |
C-b & | |
# Rename window |
This file contains 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
attrs==21.2.0 | |
Automat==20.2.0 | |
Babel==2.8.0 | |
bcrypt==3.2.0 | |
blinker==1.4 | |
certifi==2020.6.20 | |
chardet==4.0.0 | |
click==8.0.3 | |
cloud-init==23.3.3 | |
colorama==0.4.4 |
This file contains 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
# Make sure you are in the repo directory | |
cd <somewhere> | |
# Add the external repository as a submodule | |
git submodule add <address_of_submodule_repo> | |
# Make sure to initialize it and update (when required) | |
git submodule init | |
git submodule update |
This file contains 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
# Remove last commit (completely) | |
git reset --hard HEAD~1 | |
# Remove specific commit (completely) | |
get reset <commit_hash> | |
# Now push with force! | |
git push --force |
This file contains 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
# Custom history configuration | |
# Run script using: | |
# chmod u+x better_history.sh | |
# sudo su | |
# ./better_history.sh | |
echo ">>> Starting" | |
echo ">>> Loading configuration into /etc/bash.bashrc" | |
echo "HISTTIMEFORMAT='%F %T '" >> /etc/bash.bashrc | |
echo 'HISTFILESIZE=-1' >> /etc/bash.bashrc |
This file contains 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
# Fetch the NIC name (e.g., eth0, ens33) | |
NIC=$(ifconfig -a | sed 's/[ \t].*//;/^\(lo\|\)$/d') | |
# Print the IP address of the NIC | |
ifconfig $NIC | awk '/t addr:/{gsub(/.*:/,"",$2);print$2}' |