Nov 11, 2026

Construction Design

 

https://www.youtube.com/shorts/1m_jRzuKoHs
https://www.youtube.com/shorts/yBofyBejX90
https://www.youtube.com/shorts/glHmKjebPyU

  adalah faktor reduksi kekuatan dan nilai 0,9 didapat dari SNI 2847:2019 beton struktural untuk bangunan gedung Pasal 21.2.2 Tabel 21.2.2





















Nov 2, 2026

Sep 8, 2026

Check security dan Vurnarable

 
1. Cek image permission in controller
grep -rn "'image'\|\"image\"\|image|" app/Http/Controllers/ | grep -v "mimes:" | grep -v "\.bak"

2. Cek proteksi terhadap file yang SUDAH TERLANJUR ter-upload sebelum fix

find storage/app/public -iname "*.svg" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php*"

find public -iname "*.svg" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php*"


3. Otorisasi / IDOR — belum kita audit sama sekali
grep -rn "function show\|function edit\|function update\|function destroy" app/Http/Controllers/*.php app/Http/Controllers*.php

4. Middleware & Route protection
cat routes/web.php | grep -A2 "Route::"  | grep -i "admin\|middleware"

5. Mass assignment
grep -rn "fillable" app/Models/*.php

6. Dependency vulnerabilities

composer audit

npm audit


7. Rate limiting untuk login & endpoint publik
grep -n "throttle" routes/web.php routes/api.php

grep -rn "::create(\$request->all())\|->update(\$request->all())\|->fill(\$request->all())" app/Http/Controllers/


Jul 26, 2026

Google Drive API and Token

 // ── SEMENTARA: ambil refresh token Google ──

// Route::get('/google/auth', function () {
//     $client = new \Google\Client();
//     $client->setClientId(env('GOOGLE_CLIENT_ID'));
//     $client->setClientSecret(env('GOOGLE_CLIENT_SECRET'));
//     $client->setRedirectUri('https://mz.ac.id/google/callback');
//     $client->addScope(\Google\Service\Drive::DRIVE);
//     $client->setAccessType('offline');
//     $client->setPrompt('consent');
//     return redirect($client->createAuthUrl());
// });

// Route::get('/google/callback', function (\Illuminate\Http\Request $request) {
//     $client = new \Google\Client();
//     $client->setClientId(env('GOOGLE_CLIENT_ID'));
//     $client->setClientSecret(env('GOOGLE_CLIENT_SECRET'));
//     $client->setRedirectUri('https://mz.id/google/callback');
//     $token = $client->fetchAccessTokenWithAuthCode($request->code);
//     dd($token); // Salin refresh_token dari sini
// });

// Route::get('/admin/google/auth',     [GoogleAuthController::class, 'redirect'])->name('google.auth');
// Route::get('/admin/google/callback', [GoogleAuthController::class, 'callback'])->name('google.callback');

Check Bug and Old Laravel Structure

 # Cari sisa struktur Laravel lama (pre-11) yang seharusnya sudah tidak ada

find . -name "Kernel.php"

find . -path "*/Http/Kernel.php"


# Cari penggunaan deprecated/pola lama

grep -rn "Illuminate\\\\Foundation\\\\Http\\\\Kernel" --include="*.php"

grep -rn "\$fillable = \[\]" --include="*.php"  # fillable kosong = mass assignment terbuka lebar kalau guarded juga kosong


grep -rlnE "eval\s*\(|base64_decode\s*\(|gzinflate\s*\(|str_rot13\s*\(|assert\s*\(|create_function\s*\(|passthru\s*\(|shell_exec\s*\(|system\s*\(|exec\s*\(" /var/www/html/ --include="*.php" | grep -v vendor/

grep -rn "DB::raw" --include="*.php"  # potensi SQL injection kalau nampung input mentah

grep -rn "->where(.*\\\$_GET\|\\\$_POST\|\\\$_REQUEST" --include="*.php"  # input superglobal mentah

grep -rn "eval(" --include="*.php"

grep -rn "dd(\|dump(\|var_dump(" --include="*.php"  # sisa debug yang lupa dihapus

grep -rln "env(" --include="*.php" | grep -v "config/"  # env() dipanggil langsung di luar config (anti-pattern Laravel)



root@m:/var/www/html# find resources/lib -type f \( -name "*.php" -o -name "*.txt" -o -name "*.zip" \)
resources/lib/waypoints/links.php
root@m:/var/www/html# grep -rn "links.php" resources/views
root@m:/var/www/html# 

Jul 20, 2026

Programmable Logic Controller (PLC) and Microcontroller

  • VCC - logic/control voltage supply
  • VM – motor power supply (separate, usually higher voltage)
  • STBY – standby pin; must be pulled high (or tied to VCC) to enable the driver, low puts it to sleep
  • UART – serial pin used to configure the driver (current limits, microstepping, etc.) from a microcontroller
  • GND – ground, harus disatukan (common ground) antara sisi logic dan sisi motor power
  • EN (Enable) – aktif LOW biasanya; kalau di-HIGH-kan driver akan mati/disable
  • MS1/MS2 (kalau ada, mode legacy) – untuk set microstepping secara hardware (biasanya tidak dipakai kalau sudah pakai UART)
  • STEP – pulsa untuk menggerakkan motor satu langkah tiap kali naik (rising edge)
  • DIR – menentukan arah putaran motor
  • 1A/1B/2A/2B atau OUT1/OUT2 – output ke kumparan motor stepper (2 pasang untuk motor 4 kabel)
  • PWMA , PWMB -

Hal penting soal wiring & konfigurasi:

  1. VM jangan disamakan dengan VCC – VM itu tegangan tinggi untuk motor (misal 8-35V tergantung chip), sementara VCC logic biasanya 3.3V atau 5V. Salah sambung bisa merusak chip.
  2. STBY wajib di-pull HIGH kalau tidak dipakai untuk fitur sleep — kalau dibiarkan floating atau LOW, motor tidak akan jalan.
  3. UART butuh resistor biasanya (misal 1K) kalau dipakai mode single-wire UART (TX dan RX digabung di satu pin PDN_UART), supaya tidak short saat mikrokontroler dan driver kirim data bersamaan.
  4. Alamat UART (MS1/MS2 sebagai address select) – kalau pakai lebih dari satu driver di bus UART yang sama, pin MS1/MS2 dipakai untuk set alamat berbeda per driver.
  5. Current limit – di beberapa driver diatur lewat trimpot (Vref), tapi di driver UART biasanya diatur lewat register software supaya lebih presisi dan tidak perlu obeng.









DRV8871











GPIO