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: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
Created September 17, 2024 08:17
Cara Menghapus folder yg tidak bisa di hapus di windows
mkdir empty_folder
robocopy /MIR ".\empty_folder" "Folder123"
Remove-Item ".\empty_folder" -Force
Remove-Item "Folder123" -Force
pada script diatas kita menghapus folder dengan nama Folder123
@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
@adinata-id
adinata-id / gist:be81ab318d4b9e475762183635f54d61
Created March 26, 2022 04:11
Lock Band Orbit Star 2 Dari Browser
javascript: set_homepage();javascript: get_band();function refreshData() {$.ajax({type: "GET",async: true,url: '/api/device/information',success: function (data) {vars = [ 'WanIPAddress', 'wan_dns_address' ];for (i = 0; i < vars.length; i++) {window[vars[i]] = getData(vars[i], data);$('#' + vars[i]).html(window[vars[i]]);}}});$.ajax({type: "GET",async: true,url: '/api/device/signal',success: function (data) {vars = [ 'rssi', 'rsrp', 'rsrq', 'sinr', 'dlbandwidth', 'ulbandwidth', 'ulfrequency', 'dlfrequency', 'pci', 'band', 'cell_id', 'nei_cellid', 'txpower' ];for (i = 0; i < vars.length; i++) {window[vars[i]] = getData(vars[i], data);if (vars[i] == 'txpower') {var arrtx = window[vars[i]].split(" ");var out = "";arrtx.forEach(e => {out = out + e + "<br/>";});$('#' + vars[i]).html(out);} else if (vars[i] == 'nei_cellid') {var arrtx = window[vars[i]].split("No");var out = "";arrtx.forEach(e => {if (e != '') {out = out + e + "<br/>";}});$('#' + vars[i]).html(out);} else {if (vars[i] == 'rsrp') {set_prg_rsrp(window
@adinata-id
adinata-id / gist:8792bf653b950b532843330588ad1c86
Created March 24, 2022 04:00
Load Balance Mikrotik PCC 2 ISP
#=====================================================
# www.duniawifi.com
#=====================================================
/interface
set ether1 comment=Modem-1
set ether2 comment=Modem-2
set ether3 comment=Lan
/ip firewall address-list
@adinata-id
adinata-id / gist:46af69077eec2b4c6265ba9fc678c61a
Created January 31, 2022 05:23
Mangle Untuk Static Route Mikrotik
# jan/31/2022 12:23:03 by RouterOS 6.49.2
# software id = AD68-8HRQ
#
# model = RB4011iGS+
# serial number = F0260E809EDC
/ip firewall mangle
add action=mark-connection chain=prerouting comment=ICMP new-connection-mark=\
icmp-c passthrough=yes protocol=icmp
add action=mark-packet chain=prerouting connection-mark=icmp-c \
new-packet-mark=paket-icmp passthrough=no protocol=icmp