Skip to content

Instantly share code, notes, and snippets.

View ThatLurker's full-sized avatar
📞
A phone rings, will you answer it Neo?

ThatLurker

📞
A phone rings, will you answer it Neo?
  • Finland
View GitHub Profile
@ThatLurker
ThatLurker / update.sh
Last active September 12, 2020 18:48
Docker-Compose update script
#!/bin/bash
confirm() {
# call with a prompt string or use a default
read -r -p "${1:-Are you sure? [y/N]} " response
case "$response" in
[yY][eE][sS]|[yY])
true
;;
*)
false
@ThatLurker
ThatLurker / check.py
Created January 2, 2018 11:04
Get fail2ban banned ip's and location
#!/usr/bin/env python
# Fail2BanGeo.py, improved
import os
import sys
import GeoIP
import pyparsing as pp
if os.geteuid() != 0:
os.execvp("sudo", ["sudo"] + ["python"] + sys.argv)
@ThatLurker
ThatLurker / rbenv-latest.sh
Last active December 16, 2017 02:37
Update ruby to latest with rbenv
#!/bin/bash
rbenv install (rbenv install -l | grep -v - | tail -1 | awk '{$1=$1};1')
rbenv global (rbenv install -l | grep -v - | tail -1 | awk '{$1=$1};1')
rbenv local (rbenv install -l | grep -v - | tail -1 | awk '{$1=$1};1')
@ThatLurker
ThatLurker / quick-install.sh
Created December 8, 2017 01:43
Apt-fast quick-install script without sudo
#!/bin/bash
set -e
apt_fast_installation() {
if ! dpkg-query --show aria2 >/dev/null 2>&1; then
apt-get update
apt-get install -y aria2
fi
wget https://raw.githubusercontent.com/ilikenwf/apt-fast/master/apt-fast -O /usr/local/sbin/apt-fast

Keybase proof

I hereby claim:

  • I am pahakalle on github.
  • I am pahakalle (https://keybase.io/pahakalle) on keybase.
  • I have a public key ASAJhQlw8cvUOIUK0GnW_y-fPHgfjtPpt9ndTVHRMDLXzgo

To claim this, I am signing this object: