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 / change color menu wp7 to old version
Last active May 23, 2026 03:49
change color menu wp7 to old version
// Force the fresh color scheme for all WP Admin users, on the runtime
add_filter( 'get_user_option_admin_color', function( $result ) {
return 'fresh';
} );
// Force the color scheme for all WP Admin users, when saving their profile
add_action( 'profile_update', function( $user_id ) {
update_user_meta( $user_id, 'admin_color', 'fresh' );
} );
@adinata-id
adinata-id / setting tailscale vpn di vps
Created March 9, 2026 06:12
setting tailscale vpn di vps
cek ip route network vps:
command: ip route
conotoh output:
104.250.118.0/24
# 1. Install Tailscale (Script resmi otomatis deteksi OS)
curl -fsSL https://tailscale.com/install.sh | sh
@adinata-id
adinata-id / setting firewall vps.txt
Last active March 6, 2026 03:30
setting firewall vps
---Keamanan----
# Install fail2ban
sudo apt update && sudo apt install fail2ban -y
# Setup UFW - whitelist SSH dulu sebelum enable
sudo ufw allow 22/tcp
sudo ufw allow 18789/tcp # openclaw gateway
@adinata-id
adinata-id / gist:ba42df24c1eda95a67cf8553bc3f2ef9
Created December 26, 2025 09:31
Batasi akses langsung ke file-file shell nginx
# Batasi akses langsung ke file-file shell
location ~ ^/(bench\.sh|rdp\.sh|rdpn\.sh|arm\.sh|armn\.sh|cpcleanup\.sh|cleanup_lsphp_sessions\.sh|speedtest\.sh|mmac\.sh|autocleanup\.sh|ioncube\.sh|yabs\.sh)$ {
set $deny_access 1;
if ($http_user_agent ~* "(wget|curl)") {
set $deny_access 0;
}
if ($deny_access = 1) {
return 403;
#!/bin/bash
DOMAIN="https://khodam.me/"
echo "=== Testing Cloudflare WAF Rules ==="
echo ""
echo "Test 1: PHP in uploads (should block)"
curl -s -o /dev/null -w "Status: %{http_code}\n" $DOMAIN/wp-content/uploads/test.php
@adinata-id
adinata-id / gist:1fed454ea0535d00dc1cf69d709b688e
Last active December 2, 2025 13:50
Mirror Server Linux Lokal
Link Mirror Server Linux Lokal:
https://mirror.gi.co.id
http://mirrors.linode.com/
contoh penggunaan utk ubuntu 22.04:
sudo tee /etc/apt/sources.list > /dev/null <<EOF
deb https://mirror.gi.co.id/ubuntu/ jammy main restricted universe multiverse
deb https://mirror.gi.co.id/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirror.gi.co.id/ubuntu/ jammy-backports main restricted universe multiverse
Unix Bench:
sudo apt update
sudo apt install -y build-essential libx11-dev libgl1-mesa-dev libxext-dev perl perl-modules make git
git clone https://github.com/kdlucas/byte-unixbench.git
cd byte-unixbench/UnixBench
./Run
@adinata-id
adinata-id / gist:c9e5b6271d550ea93d146c8f62430d2f
Created October 18, 2025 06:33
cara jalankan claude code di VPS
jalankan claude code di vps
install:
curl -fsSL https://claude.ai/install.sh | bash
Cek versi yg terinstall:
claude --version
export path:
@adinata-id
adinata-id / gist:2eba2671cc4bd0633121853f660fdbe9
Created July 14, 2025 03:07
blacklist keyword facebook untuk keyword judi online
ππ„π“π–πˆππŸ’πƒ,menang,slot,gacor,ππŽπ’πˆπ’πˆππ„π“,bosku,selot,scatt3r,jackpot,gedhe,rungkad,depo,bet,𝗝𝗨π—₯π—”π—šπ—”π—‘π—•π—˜π—§πŸ΄πŸ΄,qacor,autospin,bete,jp,wd,receh,gacoer,cuan,rekor,jepee,gacoernya,provit,rugi,nekad,s1tus,bo,bermain
@adinata-id
adinata-id / gist:a31e6d41008af0edbf5772c68c067bd5
Created July 11, 2025 09:30
sticky widget image wordpress
<?php
/**
* Custom Sticky Widget - Simple Snippet for WPCode (Final Fix Version)
*
* This version includes a CSS override to fix theme conflicts and adjusts widget width.
* Paste this into a PHP snippet in WPCode and configure the variables below.
*/
add_action('wp_footer', 'my_simple_sticky_widget_final_fix');