Skip to content

Instantly share code, notes, and snippets.

View tonidy's full-sized avatar

toni dy tonidy

View GitHub Profile
@tonidy
tonidy / 100harinulis-day-3.md
Created January 2, 2026 14:46
100 Hari Nulis - Day 3

Kenalan dengan format file Wasm dan WAT

Sebelum membahas format file, penulisan singkat WebAssembly yang benar itu Wasm bukan WASM, ini berdasarkan website resmi https://webassembly.org. Sayangnya orang-orang udah terlanjur pada pake WASM.

Seperti yang dibahas pada post [1], Wasm menggunakan format binary, disimpan dengan file extension .wasm, sedangkan WAT format teks dengan file extension .wat. Analoginya kayak gini, kalau .docx itu binary file, sedangkan .txt itu text file maka, text file bisa dengan mudah kita buka dengan aplikasi text editor (contoh: notepad di Windows/text edit di MacOS/KWrite di Linux).

Binary file wasm ini ngga bisa dibaca langsung dengan text editor, makanya dibutuhkan format lain, disitu hadirlah WAT.

Mungkin masih bingung yak? Wajar dong, karena baru pertama kali kenalan dengan wasm maupun wat. Biar kamu ngga bingung coba pegang tiang listrik, ehh lihat gambar di bawah ya.

@tonidy
tonidy / 100harinulis-day-2.md
Last active January 1, 2026 16:04
100 Hari Nulis - Day 2

TL;DR: WebAssembly lahir untuk solve performa JavaScript di browser. Tapi dengan WASI, sekarang jadi teknologi portable & secure yang bisa jalan dimana aja. Think of it as "universal binary format" untuk era cloud native.


Ketika JavaScript Mulai Kewalahan: Kisah Lahirnya WebAssembly

Apakah kamu inget pertama kali main game 3D di browser? Atau pas buka Google Maps versi web di tahun 2015? Mungkin kamu mikir "wah keren nih, lancar banget di browser". Tapi di balik layar, para developer yang bikin aplikasi itu lagi "perang" sama keterbatasan JavaScript.

@tonidy
tonidy / install.sh
Last active December 16, 2025 03:15
Custom Disco Script
#!/bin/sh
set -eu
# Log file for debugging
LOG_FILE="/tmp/disco-install.log"
# Helper function for logging
log_step() {
echo "-> $1"
}
{
"basics": {
"name": "Toni DY",
"label": "Software Engineer",
"picture": "https://example.com/photo.jpg",
"email": "[email protected]",
"phone": "",
"url": "https://tonidy.github.io",
"summary": "Prolific inventor and businessman known for developing many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the electric light bulb.",
"location": {
{
"basics": {
"name": "Thomas Edison",
"label": "Inventor and Businessman",
"picture": "https://example.com/photo.jpg",
"email": "[email protected]",
"phone": "(123) 456-7890",
"url": "https://thomasedison.com",
"summary": "Prolific inventor and businessman known for developing many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the electric light bulb.",
"location": {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Codapi Playground</title>
<link rel="stylesheet" href="https://unpkg.com/@antonz/[email protected]/dist/snippet.css" />
<style>
pre {
white-space: pre-wrap;
"actions": [
"4.148.0.0/16",
"4.149.0.0/18",
"4.149.64.0/19",
"4.149.96.0/19",
"4.149.128.0/17",
"4.150.0.0/18",
"4.150.64.0/18",
"4.150.128.0/18",
"4.150.192.0/19",
@tonidy
tonidy / nginx-configmap.yml
Created September 13, 2025 07:12
NGINX + index.html custom + Service + HTTPRoute
# 1) Buat NGINX + index.html custom + Service + HTTPRoute
cat <<'EOF' | kubectl apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-index
namespace: default
data:
index.html: |
<!doctype html>
@tonidy
tonidy / scan-vuln.sh
Last active September 9, 2025 09:20
Script to Check Vulnerable Packages
#!/usr/bin/env bash
set -euo pipefail
# Story: https://jdstaerk.substack.com/p/we-just-found-malicious-code-in-the
# Enhanced from:
# https://github.com/AndrewMohawk/RandomScripts/blob/main/scan_for_deps_qix-2025-08-09.sh
# ===== Vulnerable package list =====
VULNS="[email protected]
[email protected]
This is a sandbox environment. Using personal credentials
is HIGHLY! discouraged. Any consequences of doing so, are
completely the user's responsibilites.
You can bootstrap a cluster as follows:
1. Initializes cluster master node:
kubeadm init --apiserver-advertise-address $(hostname -i) --pod-network-cidr 10.5.0.0/16