Skip to content

Instantly share code, notes, and snippets.

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 "your_email@example.com"
@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
---
version: "2"
services:
emby:
image: ghcr.io/linuxserver/emby
container_name: emby
environment:
- PUID=1026
- PGID=100
- TZ=America/Denver
@hmidani-abdelilah
hmidani-abdelilah / wayland-gnome-ubuntu-mint.sh
Created September 11, 2022 21:29 — forked from wellington1993/wayland-gnome-ubuntu-mint.sh
How to Install Wayland Gnome on Linux Mint Ubuntu with Dependencies with PPA
#!/bin/bash
# NOTICE, EASY WAY FIRST: sudo apt install gnome-session-wayland
# If easy way not work try this below:
################# 0 - Preparation ##################
# Update and PPA
sudo add-apt-repository -y ppa:wayland.admin/daily-builds; \
apt update; \
#
# Depends
sudo apt install -y doxygen xmlto; \
@hmidani-abdelilah
hmidani-abdelilah / .zshrc
Created February 26, 2022 18:56 — forked from matthewmccullough/.zshrc
A configuration to maintain history across sessions and share it across terminals in ZShell
##############################################################################
# History Configuration
##############################################################################
HISTSIZE=5000 #How many lines of history to keep in memory
HISTFILE=~/.zsh_history #Where to save history to disk
SAVEHIST=5000 #Number of history entries to save to disk
#HISTDUP=erase #Erase duplicates in the history file
setopt appendhistory #Append history to the history file (no overwriting)
setopt sharehistory #Share history across terminals
setopt incappendhistory #Immediately append to the history file, not just when a term is killed
@hmidani-abdelilah
hmidani-abdelilah / generate-dns-queries.py
Created December 25, 2021 13:42 — forked from rolandshoemaker/generate-dns-queries.py
python3 script to generate random dns query traffic for whatever reason.
#!/usr/bin/python3
import dns.resolver
import random, time
dns.resolver.nameservers = ['localhost']
letters= [chr(ord('a')+i) for i in range(26)]
types = ['NS', 'A', 'AAAA', 'MX']
qps = 1
while True:
@hmidani-abdelilah
hmidani-abdelilah / log4j_exploitation_attempts_crowdsec.csv
Created December 23, 2021 01:04 — forked from blotus/log4j_exploitation_attempts_crowdsec.md
IPs exploiting the log4j2 CVE-2021-44228 detected by the crowdsec community
ip status country as_name
195.54.160.149 validated RU OOO Network of data-centers Selectel
167.71.13.196 validated NL DIGITALOCEAN-ASN
157.90.35.190 validated DE Hetzner Online GmbH
34.65.121.142 validated CH GOOGLE-CLOUD-PLATFORM
175.6.210.66 validated CN Hengyang
197.246.175.231 validated EG Noor Data Networks
45.155.205.233 validated RU OOO Network of data-centers Selectel
164.52.53.163 validated SG CDSC-AS1
45.146.164.160 validated RU OOO Network of data-centers Selectel