Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
# You may consider using sudo. | |
# According to https://github.com/keepassxreboot/keepassxc/blob/develop/INSTALL.md | |
# I was finally able to build keepassxc on my Mac. | |
# ensure brew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew update && brew install make cmake gcc qt libgcrypt quazip zlib libmicrohttpd libxi \ |
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/env zsh bash sh | |
# @author mko-x< | |
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then | |
echo "# Download Latest Github Release\n" | |
echo "# Description: Simply download any latest Github releases of a desired repository." | |
echo "# Parameter 1: Github repository owner/user\n" | |
echo "# Parameter 2: Github repository name\n" | |
echo "# \n" | |
fi |
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
#Firewall Seup: | |
apt-get install ufw | |
ufw default deny incomming | |
ufw default allow outgoing | |
ufw allow from $yourIP to any port 22 | |
ufw allow 443 | |
#Nginx Versionen verbergen | |
sed -i "s/# server_tokens off;/server_tokens off;/g" /etc/nginx/nginx.conf | |
#ETags entfernen | |
sed -i 's/server_tokens off;/server_tokens off;\netag off;/' /etc/nginx/nginx.conf |
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
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi |
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/sh | |
for pkg in macvim ngrep other needed packages; do | |
if brew list -1 | grep -q "^${pkg}\$"; then | |
echo "Package '$pkg' is installed" | |
else | |
echo "Package '$pkg' is not installed" | |
fi | |
done |
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
do_remove_none_images() { | |
# find untagged images | |
IMAGE_IDS=$(docker images | grep "^<none>" | awk '{print $"3"}') | |
# in case of no untagged images found do nothing | |
if [ -n "$IMAGE_IDS" ]; then | |
docker rmi $IMAGE_IDS > /dev/null 2>&1 | |
fi | |
} | |
alias d.rmi.none=do_remove_none_images | |
# you may use a cron job to execute the cleaning repeatingly |