Skip to content

Instantly share code, notes, and snippets.

@hmidani-abdelilah
hmidani-abdelilah / letsencrypt_2020.md
Created November 16, 2021 20:23 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@hmidani-abdelilah
hmidani-abdelilah / noob_deploy_script.sh
Created June 4, 2021 09:23 — forked from Tester2009/noob_deploy_script.sh
Noob way to automate my web deploy { ignore this please }
# Noob Web Deploy
# Made by @Tester2009
# February 26, 2019
# backup first from VPS backup_public
echo "Start backup remote to local"
rsync -ravz --relative --progress -e 'ssh -i /Users/tester2009/.ssh/tester2009.pem' ubuntu@some.weird.ip:/home/ubuntu/backup_public/ /Volumes/Backups/26Feb2019
echo "Done backup from /home/ubuntu/backup_public/"

Installing Arch linux with EFI

  1. Change keyboard layout:

    • loadkeys no
  2. Verify boot mode:

    • ls /sys/firmware/efi/efivars (If the directory exist your computer supports EFI)
  3. Ping some site on the Internet to verify connection:

  • ping archlinux.org
import time
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.chrome.options import Options
if __name__ == '__main__':
# 1. Optional Options (Useful for development testing)
options = Options()
options.add_argument("--disable-web-security")
@hmidani-abdelilah
hmidani-abdelilah / disable-windows-update.ps1
Created February 22, 2021 10:44 — forked from mikebranstein/disable-windows-update.ps1
Disables Windows Update with PowerShell
# set the Windows Update service to "disabled"
sc.exe config wuauserv start=disabled
# display the status of the service
sc.exe query wuauserv
# stop the service, in case it is running
sc.exe stop wuauserv
# display the status again, because we're paranoid
# In The Name Of Allah .
# -- --- ---- -- ----- -
# Fri Jan 22 05:48:48 2021
# Written By : zer0err0r .
# ======= == = ========= =
# 3, Persisting Our SPI Ruleset .
$ nft list ruleset > spi_nftables
$ nft flush ruleset
$ nft -f spi_nftables
# In The Name Of Allah .
# -- --- ---- -- ----- -
# Fri Jan 22 05:48:48 2021
# Written By : zer0err0r .
# ======= == = ========= =
# 2, Lets Create A Basic SPI Firewall .
= We will create a new [table], then a [chain], Then define our [rules] .
= The ruleset that we will write represent a basic stateful_packet_inspection[SPI] firewall .
# In The Name Of Allah .
# -- --- ---- -- ----- -
# Fri Jan 22 05:48:48 2021
# Written By : zer0err0r .
# ======= == = ========= =
# 1, Introducing NFTables On CentOS 8 .
= Its the default NetFilter frontend in CentOS8 .
= I mean, The default firewall on CentOS8 [FirewallD] uses NFTables as a backend .
= In CentOS7 it was [Netfilter <= IPTables <= FirewallD] .
@hmidani-abdelilah
hmidani-abdelilah / README.md
Created January 23, 2021 18:55 — forked from hasanbayatme/README.md
Easy to use Bash Script to Install LAMP stack on Ubuntu.

Installation

Automatic

Run the below command in terminal:

wget --no-cache -O - https://gist.github.com/EmpireWorld/737fbb9f403d4dd66dee1364d866ba7e/raw/install-lamp.sh | bash
# In The Name Of Allah .
# -- --- ---- -- ----- -
# Sat Aug 4 17:54:17 2018
# Written By : zer0err0r .
# ======= == = ========= =
# Vanilla KVM CheatSheet Using CentOS7minimal With Ethernet Connection .
= a Remote [virt-manager] will be used to manage VMs if necessary .
= SELinux is enforcing and FirewallD is enabled .
= directory_based_pool will be used and its target will be [/home/zer0err0r/kvm/] .