Skip to content

Instantly share code, notes, and snippets.

View hashfii's full-sized avatar
🏠
Working from home

Emperor Penguin hashfii

🏠
Working from home
View GitHub Profile
#!/bin/bash
# Script untuk menghapus semua cron job yang ada dan menambahkan yang baru
# Definisikan cron job yang akan ditambahkan
cron_job_1="0 0 * * * sudo reboot"
# Hapus semua cron job yang ada
crontab -r
#!/bin/bash
# Hapus atribut "immutable" dari file /etc/dhcpcd.conf
sudo chattr -i /etc/dhcpcd.conf
# Hapus semua isi dari file /etc/dhcpcd.conf
sudo truncate -s 0 /etc/dhcpcd.conf
# Konfigurasi yang akan dimasukkan ke dalam file /etc/dhcpcd.conf
CONFIG="# A sample configuration for dhcpcd.
#!/bin/bash
# Hapus atribut read-only dari /etc/resolv.conf
sudo chattr -i /etc/resolv.conf
# Dapatkan IP gateway dari interface internet yang dipakai
GATEWAY_IP=$(ip route | grep default | awk '{print $3}')
# Cek apakah GATEWAY_IP berhasil didapatkan
if [ -z "$GATEWAY_IP" ]; then
#!/bin/bash
# Tentukan path ke setiap file config.ini di folder yang berbeda
config_files=(
"/opt/ping_exporter/config.ini"
"/opt/speedtest/config.ini"
"/opt/streamvideo/config.ini"
"/opt/traceroute/config.ini"
# Tambahkan path ke setiap file config lainnya di sini
)
@hashfii
hashfii / AdbCommands
Created January 26, 2024 08:00 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader