# yum repository
$ vim /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
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
#!/bin/bash | |
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'` | |
for JAIL in $JAILS | |
do | |
fail2ban-client status $JAIL | |
done |
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
#/bin/bash | |
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password (for GitLab repos). | |
# | |
# Just run this from your clone's path: | |
# bash <(curl -Ss https://gist.githubusercontent.com/hannesbe/f7ad2c8bbbfa7be6f76456183539f853/raw) | |
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
if [ -z "$REPO_URL" ]; then | |
echo "-- ERROR: Could not identify Repo url." | |
echo " It is possible this repo is already using SSH instead of HTTPS." |
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
#/bin/bash | |
# Watchdog install script for raspberry pi | |
# based on http://binerry.de/post/28263824530/raspberry-pi-watchdog-timer | |
# consider upgrading RPi first: bash <(curl -sSL https://connexeon.link/upgrade-rpi) | |
# | |
# Just run this oneliner: | |
# bash <(curl -sSL https://gist.github.com/hannesbe/c2018b397691bc1a32b6e039c2300dc8/raw) | |
sudo -u root -H /bin/bash <<EOF |
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
#!/bin/bash | |
sudo add-apt-repository ppa:noobslab/themes | |
sudo add-apt-repository ppa:noobslab/icons | |
sudo add-apt-repository ppa:ravefinity-project/ppa | |
sudo add-apt-repository ppa:snwh/pulp | |
sudo apt-get update | |
sudo apt-get install humanitary-gtk-theme | |
sudo apt-get install humanitary-icon-theme |
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
#!/usr/bin/env bash | |
declare -- url="$1" | |
if [[ -z "$url" ]]; then | |
echo "Missing url" | |
exit 1 | |
fi | |
# @example https://goo.gl/ | |
curl -sLD - "$url" -o /dev/null |
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
#/bin/bash | |
# Installs google-drive-ocamlfuse on Debian (Stretch & Buster) | |
# | |
# Run this oneliner to make it happen | |
# bash <(curl -sSL https://gist.github.com/hannesbe/6c110e9de6644f07a48eecfdbe6b728d/raw) | |
sudo apt install -y software-properties-common dirmngr | |
sudo cat > /etc/apt/sources.list.d/alessandro-strada-ubuntu-ppa-bionic.list << EOF | |
deb http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu xenial main |