Skip to content

Instantly share code, notes, and snippets.

View hmidani-abdelilah's full-sized avatar

hmidani abdelilah hmidani-abdelilah

View GitHub Profile
@hmidani-abdelilah
hmidani-abdelilah / README.md
Created May 4, 2025 17:30 — forked from asheroto/README.md
Easily install and configure GeoIP for use with iptables which enables you to block/allow entire countries.

Configure GeoIP for iptables

This script configures GeoIP for use with iptables. Installs Linux headers, uses xtables-addons, uses latest db-ip.com database, fixes dependencies, loads xt_geoip module.

Supports colored message using ANSI escape codes. 😎

Run the script as root or with sudo.

Script Functionality

@hmidani-abdelilah
hmidani-abdelilah / friday.md
Created October 2, 2024 11:41 — forked from yorickdowne/friday.md
Debian 13 trixie upgrade

Debian 13

This has not been tested, and is a placeholder for instructions when Debian 13 is released in 2025

To start, read the official release notes.

If your install fits into "vanilla Debian plus maybe a handful of 3rd-party repos", then this guide for a simple upgrade to Debian 13 "trixie" from Debian 12 "bookworm" can be helpful. 3rd-party repos are handled with a find command.

Note upgrade is only supported from Debian 12 to Debian 13. If you are on Debian 11, upgrade to Debian 12 first. Then once on Debian 12, you can upgrade to Debian 13.

@hmidani-abdelilah
hmidani-abdelilah / install_sis_graphics_on_linux.sh
Created December 8, 2023 07:49 — forked from fevangelou/install_sis_graphics_on_linux.sh
Bash script to install SiS Mirage 3+ graphics drivers on Linux
#!/bin/bash
# Bash script to install SiS Mirage 3+ graphics drivers on Linux
# Supports 671/672MX graphics cards
#
# Created in March 2019
#
# Tested on:
# - Lubuntu 18.04 (32-bit) with X.Org v1.19
# - Xubuntu 18.04 (64-bit) with X.Org v1.20
@hmidani-abdelilah
hmidani-abdelilah / raspberry-pi4.md
Created October 1, 2023 22:10 — forked from RomelSan/raspberry-pi4.md
First things to do with a Raspberry Pi 4 (Raspbian Lite)

First things to do with a Raspberry Pi 4 (Raspbian Lite)

Initial Changes

  • Change User Password
  • Change Hostname
  • Enable SSH
  • Change Time-Zone
    sudo timedatectl
  • Memory Spit
    sudo raspi-config

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "[email protected]"
@hmidani-abdelilah
hmidani-abdelilah / LogInSystem.py
Created May 1, 2023 12:28 — forked from tiwarinaman/LogInSystem.py
This is a python login system with the database(MySql). In this project I have used the Tkinter module for the GUI of the project. Before run this on your system you make sure you have a mysql database on your system, if not then install and then create the table named as "login" and column name will be "user" and "password" and now you good to go.
from tkinter import *
from tkinter import messagebox
import mysql.connector
import os
import time
#connecting to the database
db = mysql.connector.connect(host="localhost",user="root",passwd="root",database="techienaman")
mycur = db.cursor()
@hmidani-abdelilah
hmidani-abdelilah / encrypt_1.py
Created April 4, 2023 18:21 — forked from hackerdem/encrypt_1.py
python simple encryption and database connection example
from passlib.hash import pbkdf2_sha256
import getpass
import mysql.connector
def enc_pass(pwd):
hash=pbkdf2_sha256.encrypt(pwd,rounds=200,salt_size=16)
return hash
def con_database(pwd):
cnx=mysql.connector.connect(user='*****',password='*****',host='*******',database='******')
cursor=cnx.cursor()
try:
@hmidani-abdelilah
hmidani-abdelilah / nvenc-capabilities-ffmpeg.md
Created November 4, 2022 18:43 — forked from Brainiarc7/nvenc-capabilities-ffmpeg.md
See the supported NVENC and NPP capabilities in your FFmpeg build

Quickly check for supported NVENC and NPP hardware acceleration capabilities in FFmpeg on your platform:

Depending on how you built ffmpeg, you may want to check the supported NVENC-based hardware acceleration capabilities in ffmpeg by running:

$ for i in encoders decoders filters; do
    echo $i:; ffmpeg -hide_banner -${i} | egrep -i "npp|cuvid|nvenc|cuda|nvdec"
done

Sample output (as on my testbed):

@hmidani-abdelilah
hmidani-abdelilah / gist:7e11b62602e8a76f629eaccbd6385ffd
Created November 4, 2022 14:46 — forked from djaiss/gist:85a0ada83e6bca68e41e
Block Twitter/Facebook in your /etc/hosts
# Block Facebook IPv4
127.0.0.1 www.facebook.com
127.0.0.1 facebook.com
127.0.0.1 login.facebook.com
127.0.0.1 www.login.facebook.com
127.0.0.1 fbcdn.net
127.0.0.1 www.fbcdn.net
127.0.0.1 fbcdn.com
127.0.0.1 www.fbcdn.com
127.0.0.1 static.ak.fbcdn.net