Skip to content

Instantly share code, notes, and snippets.

View delgh1's full-sized avatar

Jing Luo delgh1

View GitHub Profile
@delgh1
delgh1 / uninstall_cortana_(admin).ps1
Created May 3, 2023 10:08
Uninstall Cortana powershell scipt, needs admin permission
Get-AppxPackage -allusers Microsoft.549981C3F5F10 | Remove-AppxPackage
@delgh1
delgh1 / .bashrc
Last active July 20, 2023 17:05
Ultimate custom Bash prompt for Arch
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@delgh1
delgh1 / Arch-inux-packages-essential.txt
Last active June 25, 2023 20:23
Arch-inux-packages-essential
base base-devel linux linux-lts linux-firmware linux-headers linux-lts-headers vim nano wget dosfstools efibootmgr apparmor grub os-prober python-distro iperf3 hyfetch lvm2 openssh man-db reflector git github-cli sudo bash-completion inetutils
noto-fonts noto-fonts-cjk noto-fonts-emoji wpa_supplicant networkmanager tlp plasma-meta kde-applications ssdm dialog firefox
gnome gnome-extra gdm firefox
cinnamon lightdm
amd-ucode mesa
nvidia nvidia-lts
qemu-guest-agent
AUR
ssh-import-id
@delgh1
delgh1 / switch-from-dhcpcd-to-systemd-networkd-pi-os.sh
Last active August 5, 2023 08:59
A script to switch from dhcpcd to systemd-networkd on Raspberry Pi OS
#!/bin/bash
# Use systemd-networkd instead of dhcpcd as the DHCP client for Raspberry Pi OS
# remember to use wpa_passphrase to add SSID & PW to /etc/wpa_supplicant/wpa_supplicant.conf
# checking sudo privilege
if [[ "$EUID" -ne 0 ]]; then
echo "This script must be run as root" 1>&2 # redirect stdout to stderr
exit 1