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 / 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
@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' [email protected]:/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