Skip to content

Instantly share code, notes, and snippets.

View hannesbe's full-sized avatar
🏠
Working from home

Hannes Van de Vel hannesbe

🏠
Working from home
View GitHub Profile
@hannesbe
hannesbe / fail2ban-allstatus.sh
Created January 14, 2016 01:33 — forked from kamermans/fail2ban-allstatus.sh
Show status of all fail2ban jails at once
#!/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
@hannesbe
hannesbe / Install.md
Created June 24, 2017 20:12 — forked from zhiephie/Install.md
Installing nginx, php7-fpm with opcache, memcached, phpredis and xdebug extension on Centos 7

run ./setup.sh

Install Nginx

# yum repository  
$ vim /etc/yum.repos.d/nginx.repo
  [nginx]
  name=nginx repo
  baseurl=http://nginx.org/packages/centos/7/$basearch/
 gpgcheck=0
@hannesbe
hannesbe / fix_gitlab_https_repo.sh
Last active March 13, 2018 06:11 — forked from m14t/fix_github_https_repo.sh
Convert HTTPS gitlab clones to use SSH
#/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."
@hannesbe
hannesbe / install-rpi-watchdog.sh
Last active March 17, 2018 20:40 — forked from P8H/install_watchdog.sh
Watchdog install script for Raspberry Pi
#/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
@hannesbe
hannesbe / install_themes.sh
Last active March 18, 2018 15:38 — forked from molcay/install_themes.sh
Themes from Noobslab.com
#!/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
@hannesbe
hannesbe / curl-header-with-follow-redirect.sh
Created August 25, 2018 16:06 — forked from rvflash/curl-header-with-follow-redirect.sh
Display request headers with command line curl and follow redirects
#!/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
@hannesbe
hannesbe / install-google-drive-ocamlfuse-debian.sh
Last active September 6, 2023 15:01 — forked from OneCDOnly/gist:972755c5c5825ddd819cb2729a52b646
Install 'google-drive-ocamlfuse' on Debian Stretch & Buster
#/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