Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am refalm on github.
  • I am refalm (https://keybase.io/refalm) on keybase.
  • I have a public key ASAH_55K-XLhDnqO9ek3Co0R6d8VQQQ-bdBWcffuy_gErAo

To claim this, I am signing this object:

@Refalm
Refalm / sources.list
Last active January 9, 2024 17:34
Debian 12 sources.list
deb http://cdn-aws.deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb-src http://cdn-aws.deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb http://cdn-aws.deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src http://cdn-aws.deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb http://cdn-aws.deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
deb-src http://cdn-aws.deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
deb http://cdn-aws.deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware
@Refalm
Refalm / gist:efaea50b1445f8417df0db662f456e60
Created June 19, 2023 20:00
Debian automatic updates
apt update && apt upgrade -y && apt autoremove -y && apt install -y unattended-upgrades && echo -e "APT::Periodic::Update-Package-Lists \"1\";\nAPT::Periodic::Unattended-Upgrade \"1\";\n" > /etc/apt/apt.conf.d/20auto-upgrades && echo -e "Dpkg::Options {\n\t\"--force-confdef\";\n\t\"--force-confold\";\n}\n" > /etc/apt/apt.conf.d/local && echo -e 'Unattended-Upgrade::Origins-Pattern {\n\t"origin=Debian,codename=${distro_codename}-updates";\n\t"origin=Debian,codename=${distro_codename},label=Debian";\n\t"origin=Debian,codename=${distro_codename},label=Debian-Security";\n\t"origin=Debian,codename=${distro_codename}-security,label=Debian-Security";\n};\n\nUnattended-Upgrade::Package-Blacklist {\n};\n\nUnattended-Upgrade::AutoFixInterruptedDpkg "true";\nUnattended-Upgrade::Remove-Unused-Kernel-Packages "true";\nUnattended-Upgrade::Remove-New-Unused-Dependencies "true";\nUnattended-Upgrade::Remove-Unused-Dependencies "true";\nUnattended-Upgrade::Automatic-Reboot "true";\nUnattended-Upgrade::Automatic-Reboot-WithUser
apt-get install -y figlet lsb-release python3-utmp bc debian-goodies git && cd /tmp && git clone https://github.com/ldidry/dynamic-motd.git && cd dynamic-motd/ && sed -e "s/python/python3/" -i update-motd.d/20-system-info update-motd.d/sysinfo.py && cp -r update-motd.d/ /etc && rm -f /etc/motd && ln -s /var/run/motd /etc/motd
@Refalm
Refalm / x2go_debian_11_install.sh
Created June 23, 2023 13:47
X2Go installation on an empty Debian 11 (bullseye)
apt update && apt install -y gnupg gnupg1 gnupg2 && apt-key adv --recv-keys --keyserver keyserver.ubuntu.com E1F958385BFE2B6E && echo -e "deb http://packages.x2go.org/debian bullseye extras main\ndeb-src http://packages.x2go.org/debian bullseye extras main" > /etc/apt/sources.list.d/x2go.list && apt update && apt install -y lightdm xfce4* x2goserver x2goserver-xsession && echo "/usr/bin/xfconf-query -c xfwm4 -p /general/use_compositing -s false" > /etc/x2go/Xsession.d/98xfwm4-no_compositing
@Refalm
Refalm / zsh_debian.sh
Created September 23, 2023 14:58
Z Shell (zsh) install in Debian
sudo apt install -y curl git zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sed -i 's#robbyrussell#agnoster#' ~/.zshrc
sh -c "git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-/home/ec2-user/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting"
sed -i 's#plugins=(git)#plugins=(git zsh-syntax-highlighting)#' ~/.zshrc
@Refalm
Refalm / disable_https_upgrade.js
Created September 24, 2023 14:55
Disable Firefox upgrading http to https automatically
user_pref("browser.fixup.fallback-to-https", false);
user_pref("network.stricttransportsecurity.preloadlist", false);
user_pref("security.mixed_content.upgrade_display_content", false);
@Refalm
Refalm / choco-install.ps1
Last active December 28, 2023 21:17
Chocolatey install with auto update, auto clean, protocol support, GUI, all Visual C++ Redistributable
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install chocolateygui choco-cleaner choco-protocol-support choco-upgrade-all-at-startup vcredist-all -y
ffmpeg.exe -i "https://www.example.com/playlist.m3u8" -c copy -bsf:a aac_adtstoasc "/tmp/output.mp4"
@Refalm
Refalm / debian_java_php_extra_packages.sh
Created May 13, 2024 18:53
Install extra Java and PHP versions in Debian
wget -O - https://apt.corretto.aws/corretto.key | sudo gpg --dearmor -o /usr/share/keyrings/corretto-keyring.gpg && echo "deb [signed-by=/usr/share/keyrings/corretto-keyring.gpg] https://apt.corretto.aws stable main" | sudo tee /etc/apt/sources.list.d/corretto.list && curl -sSL https://packages.sury.org/php/README.txt | sudo bash -x && sudo apt update
echo "RUN THIS AGAIN WHEN YOU'RE SWITCHING DEBIAN RELEASES!"