Saturday, 14 November 2026

Google sebagai mini web server

 Untuk membuat dan menerbitkan aplikasi web sederhana menggunakan **Google Apps Script**, Anda tidak memerlukan server eksternal karena seluruh kode berjalan di infrastruktur cloud Google dan terhubung langsung dengan akun Google Anda.


Berikut adalah panduan langkah demi langkah untuk membuat halaman web sederhana (misalnya menampilkan data atau antarmuka interaktif) dan mempublikasikannya secara publik:


1. **Buka Google Apps Script:** Masuk ke platform pengelolaan skrip Google.

Buka browser Anda dan akses situs **[script.google.com](https://script.google.com/)**. Pastikan Anda sudah masuk menggunakan akun Google Anda, lalu klik tombol **New Project** (Proyek Baru) di pojok kiri atas.



2. **Berikan Nama Proyek:** Ganti nama proyek agar mudah dikenali.

Di bagian sudut kiri atas halaman editor (biasanya tertulis *Untitled project*), klik dan ubah namanya menjadi sesuatu yang relevan, misalnya `WebSederhanaSaya`.



3. **Tulis Kode Sisi Server (Code.gs):** Fungsi doGet() wajib ada untuk merender halaman web.

Di file `Code.gs` yang terbuka secara otomatis, hapus semua kode bawaan dan tempelkan kode berikut:


```javascript

function doGet() {

  // Mengarahkan ke file HTML bernama 'Index' yang akan kita buat

  return HtmlService.createHtmlOutputFromFile('Index')

      .setTitle('Aplikasi Web Sederhana Saya')

      .setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);

}


```



4. **Buat File Tampilan (Index.html):** Membuat tampilan antarmuka pengguna.

1. Di sebelah kiri (kolom file), klik ikon tanda tambah (**+**) lalu pilih **HTML**.

2. Beri nama file tersebut dengan persis: `Index` (tanpa perlu menambahkan ekstensi `.html` karena sistem akan menambahkannya otomatis).

3. Hapus kode bawaan di dalam file `Index.html` tersebut, lalu masukkan kode HTML/CSS/JavaScript berikut:


```html

<!DOCTYPE html>

<html>

  <head>

    <base target="_top">

    <meta charset="utf-8">

    <title>Web Sederhana Google Apps Script</title>

    <style>

      body { font-family: Arial, sans-serif; text-align: center; margin-top: 50px; background-color: #f4f7f6; }

      .card { background: white; padding: 30px; border-radius: 8px; display: inline-block; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }

      h1 { color: #2c3e50; }

      button { background-color: #3498db; color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; font-size: 16px; }

      button:hover { background-color: #2980b9; }

    </style>

  </head>

  <body>

    <div class="card">

      <h1>Halo dari Google Apps Script!</h1>

      <p>Halaman web ini di-hosting langsung menggunakan akun Google Anda.</p>

      <button onclick="sapaUser()">Klik Saya</button>

      <p id="pesan" style="margin-top: 20px; font-weight: bold; color: #27ae60;"></p>

    </div>


    <script>

      function sapaUser() {

        document.getElementById('pesan').innerText = "Terima kasih sudah mencoba web sederhana ini!";

      }

    </script>

  </body>

</html>


```



5. **Deploy sebagai Web App:** Menyiapkan tautan publik agar bisa diakses siapa saja.

1. Di sudut kanan atas editor, klik tombol **Deploy** lalu pilih **New deployment** (Penerapan baru).

2. Klik ikon roda gigi/ikon jenis penerapan di sebelah kiri, lalu pilih **Web app**.

3. Isi kolom yang tersedia:

* **Description:** Tulis keterangan bebas, misal `Versi 1`.

* **Execute as:** Pilih **Me** (Anda).

* **Who has access:** Ubah menjadi **Anyone** (Siapa saja, bahkan yang tidak punya akun Google) agar link bisa diakses bebas.



4. Klik **Deploy**.

5. Google akan meminta izin akses (*Authorize access*). Pilih akun Google Anda, klik *Advanced* (Lanjutan), lalu klik *Go to Untitled project (unsafe)* — ini aman karena ini adalah kode buatan Anda sendiri — lalu klik **Allow** (Izinkan).



6. **Salin URL Web App:** Simpan URL aplikasi Anda.

Setelah proses *deployment* selesai, Anda akan melihat jendela kecil berisi **Web app URL**. Salin tautan tersebut dan buka di tab browser baru. Halaman web interaktif Anda kini sudah online dan bisa diakses dari perangkat apa pun!



---

Sunday, 1 November 2026

Supaya Hamachi selain online di Server

 

Berikut script Bash untuk Rocky Linux yang akan memeriksa koneksi IP 25.22.158.103 setiap 30 menit. Jika IP tidak bisa di-ping, otomatis menjalankan restart Hamachi.

1. Buat script

Buat file:

sudo nano /usr/local/bin/monitor-hamachi.sh

Isi dengan script berikut:


#!/bin/bash

# Konfigurasi
TARGET="25.22.158.103"
LOG="/var/log/monitor-hamachi.log"

# Cek koneksi ping (3 kali percobaan)
if ping -c 3 -W 5 "$TARGET" > /dev/null 2>&1; then
    echo "$(date '+%Y-%m-%d %H:%M:%S') - OK: $TARGET bisa di-ping. Tidak ada tindakan." >> "$LOG"
else
    echo "$(date '+%Y-%m-%d %H:%M:%S') - WARNING: $TARGET tidak bisa di-ping. Restart Hamachi." >> "$LOG"

    /etc/init.d/logmein-hamachi restart >> "$LOG" 2>&1

    echo "$(date '+%Y-%m-%d %H:%M:%S') - Restart Hamachi selesai." >> "$LOG"
fi

2. Berikan izin eksekusi

sudo chmod +x /usr/local/bin/monitor-hamachi.sh

3. Tes script secara manual

sudo /usr/local/bin/monitor-hamachi.sh

Lihat hasil log:

sudo tail -n 20 /var/log/monitor-hamachi.log

4. Jalankan otomatis setiap 30 menit

Gunakan Cron:

sudo crontab -e

Tambahkan baris:

*/30 * * * * /usr/local/bin/monitor-hamachi.sh

Simpan.

5. Pastikan Cron aktif

sudo systemctl enable --now crond
sudo systemctl status crond

6. Alur kerja

Mulai pemeriksaan

Setiap 30 menit

Ping 25.22.158.103

Bisa ping

Tidak melakukan apa-apa

Tidak bisa ping

Restart Hamachi

Tunggu sampai pemeriksaan berikutnya (30 menit)

Catatan:

  • Script berjalan menggunakan hak akses root melalui Cron.

  • Ping dilakukan 3 kali dengan timeout 5 detik per percobaan.

  • Semua hasil pemeriksaan dan restart tersimpan di /var/log/monitor-hamachi.log.

  • Jika IP tidak bisa ping, Hamachi akan direstart. Pemeriksaan berikutnya tetap mengikuti jadwal 30 menit.

Saran: Script ini tidak melakukan restart berulang-ulang dalam satu pemeriksaan, sehingga lebih aman untuk koneksi Hamachi.


Monday, 26 October 2026

Error CredSSP

 Jika setting GPEDIT.MSC masih gagal

jalankan command mode administrator

ketik perintah 

 

REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2 /f 

 

Semoga berhasil 

Sunday, 1 March 2026

Remote Desktop Windows Home

✅ SOLUSI 1 – Gunakan Aplikasi Remote Pihak Ketiga (Paling Aman & Mudah)

Ini solusi yang paling direkomendasikan.

1️⃣ AnyDesk

  • Ringan

  • Gratis untuk penggunaan pribadi

  • Mudah setup

  • Cocok untuk teknisi

Website: https://anydesk.com


2️⃣ TeamViewer

  • User friendly

  • Bisa unattended access

  • Agak lebih berat dari AnyDesk


3️⃣ Chrome Remote Desktop

  • Gratis

  • Cukup login akun Google

  • Cocok kalau hanya antar PC pribadi


✅ SOLUSI 2 – Upgrade ke Windows 10 Pro

Kalau memang butuh fitur RDP bawaan Windows:

Upgrade dari:

Windows 10 Home → Windows 10 Pro

Setelah upgrade:

  • Bisa aktifkan Remote Desktop

  • Bisa akses via mstsc

  • Bisa dipakai dalam jaringan lokal atau VPN

Cara cepat cek versi:
Tekan Win + R → ketik:

winver

⚠️ SOLUSI 3 – Patch RDP (Tidak Direkomendasikan)

Ada tool seperti:

  • RDP Wrapper

Tapi:

  • Tidak resmi

  • Riskan error setelah update Windows

  • Bisa dianggap modifikasi sistem

Untuk PC client / kantor / server, saya tidak sarankan.



Tuesday, 24 February 2026

Disk 100%, CPU 30% dan Memory 82%

Terlihat Disk 100%, sementara CPU 30% dan Memory 82%. Masalah utamanya ada di Disk Usage 100% (sering terjadi di Windows, terutama jika pakai HDD).

Berikut langkah solusi bertahap (mulai dari yang paling aman & umum):


1️⃣ Cek proses yang bikin Disk 100%

  1. Tekan Ctrl + Shift + Esc → Task Manager

  2. Klik tab Processes

  3. Klik kolom Disk (urutkan dari terbesar)

  4. Lihat aplikasi apa yang paling boros

👉 Jika ada:

  • Windows Update

  • Antimalware Service

  • SysMain

  • Aplikasi tertentu
    → lanjut ke langkah di bawah.


2️⃣ Matikan sementara SysMain (Superfetch)

Sering jadi penyebab Disk 100% di HDD.

  1. Tekan Win + R

  2. Ketik services.msc

  3. Cari SysMain

  4. Klik kanan → Stop

  5. Startup type → Disabled

  6. Restart


3️⃣ Matikan Windows Search Indexing

  1. Tekan Win + R

  2. Ketik services.msc

  3. Cari Windows Search

  4. Stop dan Disabled


4️⃣ Cek kesehatan Disk (WAJIB)

Buka Command Prompt (Run as Administrator) lalu jalankan:

chkdsk C: /f /r

Jika diminta restart → Yes

⚠️ Jika sering Disk 100% + lambat → bisa tanda HDD mulai rusak.


5️⃣ Kurangi beban Memory (82% cukup tinggi)

  • Tutup aplikasi berat (Chrome banyak tab, Android emulator, dll)

  • Disable startup apps:

    1. Task Manager → Startup

    2. Disable yang tidak penting


6️⃣ Update driver SATA / Storage

  • Buka Device Manager

  • Expand IDE ATA/ATAPI atau Storage Controllers

  • Update driver


7️⃣ Solusi PALING EFEKTIF (jika masih HDD)

💡 Ganti HDD ke SSD

  • Disk 100% akan hilang total

  • Windows jadi jauh lebih cepat

  • Upgrade paling terasa dibanding tambah RAM


Kesimpulan singkat

  • Masalah utama: Disk 100%

  • Penyebab umum: HDD + SysMain + Windows Search

  • Solusi terbaik: SSD


Source : ChatGPT

Friday, 8 August 2025

Konfigurasi Lengkap Queue Tree + PCQ / HTB di MikroTik

 Berikut adalah konfigurasi lengkap Queue Tree + PCQ / HTB di MikroTik yang memenuhi semua kebutuhan kamu:


🎯 Tujuan Konfigurasi

  1. Limit bandwidth presisi & otomatis per user (PCQ)

  2. Cocok untuk 5–50 pengguna (DHCP)

  3. Prioritas 1: Komunikasi (WhatsApp, Zoom, VoIP, dll)

  4. Prioritas 2: Web Browsing

  5. Prioritas 3: Download (dibatasi 5 Mbps)

  6. Berlaku untuk semua user DHCP secara otomatis

  7. Implementasi dengan Queue Tree + Mangle + PCQ + HTB


🧱 Asumsi

  • ether1 = WAN (ke internet)

  • ether2 = LAN (ke user DHCP)

  • IP LAN = 192.168.88.0/24 (ubah jika beda)

  • User pakai DHCP otomatis dari MikroTik

  • Prioritas diberi lewat priority (1 = tertinggi, 8 = terendah)


🔧 LANGKAH 1: Buat PCQ Type

/queue type
add name=pcq-comm kind=pcq pcq-rate=1M pcq-classifier=dst-address
add name=pcq-web kind=pcq pcq-rate=512k pcq-classifier=dst-address
add name=pcq-download kind=pcq pcq-rate=5M pcq-classifier=dst-address

🔧 LANGKAH 2: Mangle untuk Tandai Traffic

/ip firewall mangle
# Tandai koneksi komunikasi
add chain=forward protocol=udp port=3478,5349,10000,30000-50000 action=mark-connection new-connection-mark=comm-conn passthrough=yes
add chain=forward protocol=tcp port=443 dst-port=443 content=whatsapp action=mark-connection new-connection-mark=comm-conn passthrough=yes

# Tandai koneksi web
add chain=forward protocol=tcp port=80,443 action=mark-connection new-connection-mark=web-conn passthrough=yes

# Tandai koneksi download (umumnya HTTP besar, FTP, video streaming, dll)
add chain=forward protocol=tcp port=20,21,8000-8999,8080 action=mark-connection new-connection-mark=download-conn passthrough=yes

# Tandai paket berdasarkan koneksi
add chain=forward connection-mark=comm-conn action=mark-packet new-packet-mark=comm-packet passthrough=no
add chain=forward connection-mark=web-conn action=mark-packet new-packet-mark=web-packet passthrough=no
add chain=forward connection-mark=download-conn action=mark-packet new-packet-mark=download-packet passthrough=no

🔧 LANGKAH 3: Buat Queue Tree

/queue tree
# KOMUNIKASI - PRIORITAS 1
add name="COMM-TREE" parent=ether1 packet-mark=comm-packet queue=pcq-comm priority=1

# WEB BROWSING - PRIORITAS 2
add name="WEB-TREE" parent=ether1 packet-mark=web-packet queue=pcq-web priority=2

# DOWNLOAD - PRIORITAS 3
add name="DOWNLOAD-TREE" parent=ether1 packet-mark=download-packet queue=pcq-download priority=8 max-limit=5M

Jika ingin memisahkan upload & download, bisa buat dua set mangle dan queue untuk masing-masing in-interface dan out-interface.


🧠 Penjelasan:

  • PCQ otomatis mendeteksi IP user dari DHCP

  • Priority 1, 2, 8 digunakan MikroTik HTB untuk mengatur antrian

  • Komunikasi (Zoom, WhatsApp, dll) tetap lancar walau user banyak download

  • Download tetap bisa tapi dibatasi maksimal 5 Mbps total


✅ BONUS: Lihat Statistik Realtime

Gunakan:

/queue tree print stats

Untuk memantau penggunaan bandwidth setiap kelas.


🔄 Opsional:

Ingin supaya total bandwidth dibatasi juga? Misal total maksimal 50 Mbps?
Tambahkan satu queue parent:

/queue tree
add name="PARENT-LIMIT" parent=ether1 max-limit=50M

Lalu jadikan semua child tree (COMM-TREE, WEB-TREE, DOWNLOAD-TREE) sebagai child dari PARENT-LIMIT.


Kalau kamu pakai hotspot atau VLAN, tinggal sesuaikan parent dan ip subnet saja.

Perlu saya bantu buatkan export script .rsc lengkap biar bisa copy-paste langsung?

Konfigurasi Queue Tree + PCQ (HTB)

 Berikut adalah konfigurasi Queue Tree + PCQ (HTB) yang otomatis membatasi bandwidth per user (tanpa perlu atur satu-satu), cocok untuk jaringan dengan 5–50 user DHCP, dan bandwidth terbagi adil secara otomatis:


🎯 Tujuan:

  • Semua user DHCP dibatasi 1 Mbps upload / 2 Mbps download per user

  • Total bandwidth dibagi merata otomatis (misal 50 user sharing 100 Mbps tetap masing-masing dapat 2 Mbps)

  • Tanpa perlu IP statis

  • Gunakan interface LAN dan interface WAN sesuai perangkat kamu (ganti nama jika perlu)


🧱 Langkah 1: Buat PCQ Type

/queue type
add name=pcq-download kind=pcq pcq-rate=2M pcq-classifier=dst-address pcq-limit=50 pcq-total-limit=2000
add name=pcq-upload kind=pcq pcq-rate=1M pcq-classifier=src-address pcq-limit=50 pcq-total-limit=2000

🎯 Penjelasan:

  • dst-address → untuk download (target IP di LAN)

  • src-address → untuk upload (source IP dari LAN)

  • pcq-rate → batas kecepatan per user

  • pcq-limit/total-limit → buffer per koneksi dan total


🧱 Langkah 2: Tandai koneksi dan paket

Asumsikan:

  • ether1 = WAN

  • ether2 = LAN (DHCP ke client)

/ip firewall mangle
add chain=forward action=mark-connection new-connection-mark=conn-download passthrough=yes in-interface=ether1
add chain=forward action=mark-connection new-connection-mark=conn-upload passthrough=yes in-interface=ether2

add chain=forward action=mark-packet new-packet-mark=packet-download passthrough=no connection-mark=conn-download
add chain=forward action=mark-packet new-packet-mark=packet-upload passthrough=no connection-mark=conn-upload

🧱 Langkah 3: Buat Queue Tree

/queue tree
add name="DOWNLOAD-TREE" parent=ether2 packet-mark=packet-download queue=pcq-download
add name="UPLOAD-TREE" parent=ether1 packet-mark=packet-upload queue=pcq-upload

🔧 Tambahan (Opsional)

Jika interface kamu beda (misalnya bridge atau VLAN), sesuaikan parent di queue tree.

Contoh:

  • Kalau pakai bridge: parent=bridge1

  • Kalau VLAN: parent=vlan10


✅ Hasil Akhir:

  • Setiap device yang terhubung ke LAN akan dapat 2 Mbps download & 1 Mbps upload

  • Otomatis, walaupun jumlah user naik-turun

  • Tetap adil, tanpa berebut bandwidth


Kalau kamu mau atur pembagian misalnya:

  • Total 50 Mbps dibagi rata (bukan limit fix per user)

  • Limit per grup IP (misalnya: 192.168.88.0 dibedakan dengan 192.168.89.0)

... saya juga bisa bantu. Cukup bilang saja.

Perlu juga script backup-nya atau ekspor otomatisnya?