Skip to content

Instantly share code, notes, and snippets.

View souhaiebtar's full-sized avatar
:octocat:
Focusing

souhaiebtar

:octocat:
Focusing
View GitHub Profile
@souhaiebtar
souhaiebtar / debian ignore-skip signature-key-verification-check.sh
Last active April 25, 2025 10:53
[debian ignore-skip signature-key-verification-check] debian ignore-skip signature-key-verification-check #debian #skip #check
# source: https://askubuntu.com/questions/74345/how-do-i-bypass-ignore-the-gpg-signature-checks-of-apt #link-check-available 4/25/2025
sudo apt -o Acquire::AllowInsecureRepositories=true \
-o Acquire::AllowDowngradeToInsecureRepositories=true \
update
sudo apt -o Acquire::AllowInsecureRepositories=true \
-o Acquire::AllowDowngradeToInsecureRepositories=true \
-y upgrade
@souhaiebtar
souhaiebtar / create_environment_variable_no_history.sh
Created April 22, 2025 19:15
[create environment Variable no history] create environment Variable no history #powershell #bash #zsh #environment #variable
#### Powershell
# Prompt securely for the API Key
$apiKeyTemp = Read-Host "Enter your API Key"
# Set the environment variable using the temporary variable
$env:API_KEY = $apiKeyTemp
# Optional: Clear the temporary variable from memory
@souhaiebtar
souhaiebtar / starhip.toml
Created March 30, 2025 11:03
[starship config] starship config #starship #terminal
# SOURCES
# https://starship.rs/config
# https://starship.rs/presets/nerd-font.html#configuration
# DEBUG via:
# starship explain
# STARSHIP_LOG=trace
"$schema" = 'https://starship.rs/config-schema.json'
@souhaiebtar
souhaiebtar / backup_and_restore_postgres_database.sh
Created March 5, 2025 13:35
[Backup and restore a postgres dump] Backup and restore a mysql #postgres #database #db
pg_dump -U postgres -d qanda_db -F c -b -v -f output_file.dump
pg_restore -U postgres -v -d test123 .\output_file.dump
@souhaiebtar
souhaiebtar / 00-serial-console-unraidVm settings.md
Last active February 25, 2025 14:45 — forked from lukasnellen/00-serial-console.md
kvm serial console for virtual machine - unraid

Serial console for KVM based VM and IPMI serial channel

grub and kernel console

Set in /etc/default/grub:

...
###GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0,115200n8 console=tty1"
GRUB_CMDLINE_LINUX=""
@souhaiebtar
souhaiebtar / unzip.rb
Created May 31, 2024 19:29
[install custom unzip using homebrew] install custom unzip using homebrew #unzip #homebrew #brew
class Unzip < Formula
desc "Extraction utility for .zip compressed archives"
homepage "https://infozip.sourceforge.net/UnZip.html"
url "https://downloads.sourceforge.net/project/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz"
version "6.0"
sha256 "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37"
license "Info-ZIP"
revision 8
livecheck do
@souhaiebtar
souhaiebtar / links.txt
Created May 24, 2024 08:09
[linksDownload]linksDownloadTmp
@souhaiebtar
souhaiebtar / package-list.txt
Last active May 9, 2024 05:52
[xiaomi openwrt package immortal-wrt] packages immortalwrt openwrt #openwrt #xiaomi
-uboot-envtools base-files block-mount busybox ca-bundle default-settings-chn dnsmasq-full dropbear firewall4 fstools ipv6helper kmod-gpio-button-hotplug kmod-leds-gpio kmod-mt7603 kmod-mt76x2 kmod-nf-nathelper kmod-nf-nathelper-extra kmod-nft-offload libc libgcc libustream-openssl logd luci luci-app-opkg luci-compat luci-lib-base luci-lib-fs luci-lib-ipkg mtd netifd nftables opkg ppp ppp-mod-pppoe procd procd-seccomp procd-ujail uboot-envtools uci uclient-fetch urandom-seed urngd wpad-openssl luci-proto-wireguard luci-app-sqm luci-theme-argon collectd luci-app-statistics iperf3 irqbalance htop curl ca-certificates luci-app-ddns-go
----
@souhaiebtar
souhaiebtar / links_links_08_may_2024_workLaptop-content-voice-ai-whisper-translate-github-projects.json
Created May 8, 2024 19:44
[links_08_may_2024_workLaptop]links_08_may_2024_workLaptop #links #voice #ai #whisper #translate
@souhaiebtar
souhaiebtar / transcode_video_ffmpeg.ps1
Created May 8, 2024 18:07
[transcode-compress-video-using-ffmpeg]transcode/compress video using ffmpeg #ffmpeg #powershell
function to65 {
/usr/lib/jellyfin-ffmpeg/ffmpeg \
-c:v h264_qsv \
-i "$1" \
-map 0 -c copy \
-c:v hevc_qsv -preset slow -global_quality 22 -look_ahead 1 \
$2 \
"${1%.*} x265.mkv";
}