This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ip=$(curl -s https://api.ipify.org) && \ | |
loc=$(curl -s https://ipapi.co/${ip}/json | jq -r '"\(.city), \(.region), \(.country_name)"') && \ | |
echo "My public IP address is: $ip" && echo "My location is: $loc" && echo && ping 8.8.8.8 -c 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
STORAGE="YOUR BACKUP STORAGE PARTITION (check with 'lsblk')" | |
TARGET_DIR="YOUR MOUNT DIRECTORY (usually in /media/YOUR_DIR)" | |
BACKUP_DIR="$(date)-Backup" | |
#create directory and mounting device | |
create_mount(){ | |
[ ! -b $STORAGE ] && echo "$STORAGE does not exist." && exit || \ | |
[ -b $STORAGE ] && [ ! -d $TARGET_DIR ] && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PI_BOOT="YOUR PI BOOT PARTITION (check with 'lsblk')" | |
TARGET_DIR="YOUR TARGET DIR FOR MOUNTING PI BOOT PARTITION (usually '/media/YOUR_DIR')" | |
#create dir and mounting device | |
create_mount(){ | |
[ ! -b $PI_BOOT ] && echo "$PI_BOOT does not exist." && exit || \ | |
[ -b $PI_BOOT ] && [ ! -d $TARGET_DIR ] && \ | |
sudo mkdir -pv $TARGET_DIR || [ -d $TARGET_DIR ] && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#Webcam driver depend on hardware and driver in the machine | |
WEBCAM_DRIVER="Put your webcam driver here" | |
#Blacklist directory | |
CONTENT=/etc/modprobe.d/name-of-your-cam-driver-blacklist.conf | |
#help text | |
usage(){ | |
echo "Usage: blind [OPTION]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DIR1=~/.cache/thumbnails/* | |
DIR2=~/Downloads/* | |
echo "Hello $USER" | |
echo "$(date)" | |
help_txt(){ | |
# just a help text |