Skip to content

Instantly share code, notes, and snippets.

View globian's full-sized avatar
🎯
Focusing

Igor Gaffling globian

🎯
Focusing
View GitHub Profile
#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@globian
globian / install-configure-letsencrypt.md
Created February 1, 2022 08:53 — forked from craigvantonder/install-configure-letsencrypt.md
Install and configure LetsEncrypt on Ubuntu Server 14.04 & 16.04 (Apache)
#!/bin/bash
# https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-14-04
# Download the Let’s Encrypt Client
cd /usr/local/sbin
sudo wget https://dl.eff.org/certbot-auto
sudo chmod a+x /usr/local/sbin/certbot-auto
# Set Up the SSL Certificate
@ECHO OFF
SET "dgFolder=%UserProfile%\.DataGrip2016.1"
SET "evilFile=%dgFolder%\config\eval\DataGrip2.evaluation.key"
SET "evilBakFile=%dgFolder%\config\eval\DataGrip2.evaluation.key.bak"
echo exorcising evil spirit in key
if exist "%evilFile%" (
move /y "%evilFile%" "%evilBakFile%"
) else (
@globian
globian / block_china_ufw.sh
Last active June 14, 2023 15:36 — forked from lewg/block_china_ufw.sh
UFW blocks for China, Korea, Malaysia, Phillipines, Singapore, Thailand and Vietnam netblocks
#!/bin/sh
# UFW blocks for Asian countries except Japan
# Based on http://www.wizcrafts.net/chinese-iptables-blocklist.html
# https://www.ip2location.com/free/visitor-blocker
# Cambodia (KH)
ufw deny from 114.134.184.0/21
# Chinese (CN) IP addresses follow:
ufw deny from 1.68.0.0/14
ufw deny from 1.80.0.0/13