Skip to content

Instantly share code, notes, and snippets.

View adinata-id's full-sized avatar

Adinata adinata-id

View GitHub Profile
@adinata-id
adinata-id / gist:2ae5eaf04686526a4fbd05078d57e98a
Created January 15, 2025 03:23
monitoring sisa disk vps dan kirim ke telegram
#!/usr/bin/env bash
B0T_TOKEN="<teLegram-bot-token>"
CHAT_ID="<teLegram-chat-id>"
send_teLegram_message() {
local message="$1"
curl -s -X POST "https://api.teLegram.org/bot$B0T_TOKEN/sendMessage" \
-d chat_id="$CHAT_ID" \
-d text="$message" \
@adinata-id
adinata-id / gist:eab4b0819bf7027db8ca22bb3b0ba0ff
Last active December 23, 2024 08:54
First Push Repo Github
…or create a new repository on the command line
echo "# midteknologi" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/your-github-username/yourrepo.git
git push -u origin main
@adinata-id
adinata-id / gist:cb9c5282813b83e34e141cfe0da69754
Created December 23, 2024 05:57
Tips agar buka editor selalu menggunakan nano di Linux
cara temporay jalankan command:
export EDITOR=nano
cara permanent:
echo "export EDITOR=nano" >> ~/.bashrc
source ~/.bashrc
@adinata-id
adinata-id / gist:7956318b0880d561bacf3c0e5968cb0e
Created September 30, 2024 11:22
Install Mikrotik chr on VPS ARM
wget https://download.mikrotik.com/routeros/7.16/chr-7.16-arm64.img.zip -O chr.img.zip && \
gunzip -c chr.img.zip > chr.img && \
echo u > /proc/sysrq-trigger && \
dd if=chr.img bs=1024 of=/dev/sda
@adinata-id
adinata-id / gist:ec3311c4a75212972a907fd16833ac57
Last active December 22, 2024 05:24
Cara Menghapus folder yg tidak bisa di hapus di windows
cara Pertama:
gunakan command: rd /s "\\?\
contohnya: C:\Windows\System32>rd /s "\\?\D:\ScreenCast\2024\Cara Melihat History WIFI
\\?\D:\ScreenCast\2024\Cara Melihat History WIFI , Are you sure (Y/N)? Y
C:\Windows\System32>
Cara Kedua:
mkdir empty_folder
@adinata-id
adinata-id / add_delete_list_firewall_linux.txt
Created June 5, 2024 03:20
Add, Delete dan list firewall Linux
#!/bin/bash
# Cek apakah firewall-cmd tersedia
if ! command -v firewall-cmd &> /dev/null; then
echo "firewall-cmd tidak ditemukan. Pastikan firewalld terpasang dan aktif."
exit 1
fi
# Array untuk menyimpan port yang ditambahkan dan dihapus
added_ports=()
@adinata-id
adinata-id / gist:ea748ab68546d588f8eaf9ba143baf45
Created November 27, 2023 02:16 — forked from levelsio/gist:5bc87fd1b1ffbf4a705047bebd9b4790
Secret of Monkey Island: Amsterdam (by @levelsio) or how to create your own ChatGPT image+text-based adventure game
2023-11-27 MIT LICENSE
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com.
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town.
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this.
It's much easier than you think and you'll be shocked by how relatively well it works with little work.
#!/bin/sh
echo 'Started'
date +'%a %b %e %H:%M:$S %Z %Y'
s3cmd sync --recursive --preserve /srv s3://nameofyours3bucket
s3cmd sync --recursive --preserve /etc s3://nameofyours3bucket
s3cmd sync --recursive --preserve /home s3://nameofyours3bucket
s3cmd sync --recursive --preserve /var s3://nameofyours3bucket
dpkg --get-selections > dpkg.list
s3cmd sync --recursive --preserve dpkg.list s3://nameofyours3bucket
date +'%a %b %e %H:%M:$S %Z %Y'
@adinata-id
adinata-id / mikrotikactivity.txt
Created October 1, 2022 06:50
Melihat Aktivitas Browsing Mikrotik
/ip firewall address-list
add address=192.168.17.0/24 list=IP-LOKAL
/ip firewall raw
#Facebook
add action=add-dst-to-address-list address-list=Facebook address-list-timeout=12h chain=prerouting comment=Facebook content=.facebook.com dst-address-list=!IP-LOKAL src-address-list=IP-LOKAL
add action=add-dst-to-address-list address-list=Facebook address-list-timeout=12h chain=prerouting content=.facebook.net dst-address-list=!IP-LOKAL src-address-list=IP-LOKAL
add action=add-dst-to-address-list address-list=Facebook address-list-timeout=12h chain=prerouting content=fb.com dst-address-list=!IP-LOKAL src-address-list=IP-LOKAL
@adinata-id
adinata-id / gist:be5fc6d693f16dd7288482813c4700d2
Created April 12, 2022 08:44
ping monitor script batch file
@echo off
SET OUT=0F
color %OUT%
mode 44,20
echo mode 44,20
echo off & cls
Title = Ping monitor
set /p IP=Enter your IP Address :
:top