Skip to content

Instantly share code, notes, and snippets.

View hafiz-muhammad's full-sized avatar
🇺🇸

Abdul Hafiz Muhammad hafiz-muhammad

🇺🇸
View GitHub Profile
@zekiahmetbayar
zekiahmetbayar / ip_change.sh
Created January 20, 2022 10:43
Change ip automatically with bash script
#!/bin/bash
# Usage
## chmod +x ip_change.sh
## sudo ./ip_change.sh new_ip
path="/etc/network/interfaces"
current="$(hostname -I | cut -d' ' -f1 | xargs)"
new_ip=$1
@zekiahmetbayar
zekiahmetbayar / hostname_change.sh
Last active January 24, 2024 07:06
Change hostname automatically with bash script
#!/bin/bash
# Usage
## chmod +x hostname_change.sh
## sudo ./hostname_change.sh new_hostname
if [ "$EUID" -ne 0 ]
then echo "Please run as root."
exit
fi
@ChrisTitusTech
ChrisTitusTech / fixlocale.sh
Created October 27, 2020 21:51
Fix Locales in any distro
#!/bin/bash
echo "LC_ALL=en_US.UTF-8" | sudo tee -a /etc/environment
echo "en_US.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
echo "LANG=en_US.UTF-8" | sudo tee -a /etc/locale.conf
sudo locale-gen en_US.UTF-8
sudo apt install policykit-desktop-privileges policykit-1-gnome
exec --no-startup-id /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 &
OR:
sudo apt-get install lxpolkit
@gornostal
gornostal / README.md
Last active June 30, 2024 16:12
Ulauncher Color Themes

This will be a temporary site for sharing Ulauncher color themes

When posting a theme make sure it has

  • title (theme name or whatever)
  • link to a gist or github repo with theme files
  • screenshot attached (just drag an image onto a comment area)

@michaeljymsgutierrez
michaeljymsgutierrez / Fastboot_cmd.txt
Created October 5, 2017 01:14
Fastboot command lines for android
1. Flashing the recovery image:
fastboot flash recovery recovery.img
2. Flash the kernel and bootloader:
fastboot flash boot boot.img
3. Erase a partition:
fastboot erase cache
@101t
101t / Useful command line for Linux.md
Last active September 19, 2023 03:56
Frequently useful commands in Linux

Cleaning *.pyc files in terminal

find . -name "*.pyc" -exec rm -rf {} \;

or use this:

find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf

source: link