Skip to content

Instantly share code, notes, and snippets.

View reacto11mecha's full-sized avatar

Ezra Khairan Permana reacto11mecha

View GitHub Profile
@reacto11mecha
reacto11mecha / captive_portal_login.ino
Last active August 6, 2025 06:23 — forked from iqfareez/captive_portal_login.ino
Login to WIFI UNJ Mahasiswa
#include <WiFi.h>
#include <Wire.h>
#include <HTTPClient.h>
#define AP_SSID "UNJ Hotspot (Mahasiswa)"
#define AP_PASSWORD "" // Kosong karena wifi mahasiswa ga ada input pw
const String username = "1111111"; // NIM
const String password = "blahblah"; // Password wifi
## Tujuan
## Nama
#### <nama produk/projek>
## Keseluruhan Komponen
- Database: PostgreSQL
- Web untuk Admin dan Ulangan: Next.js
@reacto11mecha
reacto11mecha / 001-pertemuan-3.sql
Last active May 6, 2025 14:59
Catatan pembelajaran APLIKOM APD B 2024 122 UNJ
/*
============================================
INI FILE PERTEMUAN TIGA
kalau mau pertemuan empat, scroll lagi aja,
emang rada ke bawah.
============================================
*/
/*
Query dibawah digunakan untuk menampilkan semua customer dari USA.
From: <Saved by Blink>
Snapshot-Content-Location: https://siakad.unj.ac.id/index.php/krs
Subject: Siakad UNJ
Date: Thu, 20 Feb 2025 18:25:21 +0700
MIME-Version: 1.0
Content-Type: multipart/related;
type="text/html";
boundary="----MultipartBoundary--mTb9WGrpEHa9mfqcuRAd68pXWsDyzYkv0ClgtfpY7c----"

Saya akan menyampaikan keutamaan dari 5 ayat pertama yang diturunkan allah dan surat Ali Imran.

Yang pertama ada surat yang ga asing buat kita denger atau baca, yaitu surat Al-Alaq 1-5.

اِقْرَأْ بِا سْمِ رَبِّكَ الَّذِيْ خَلَقَ .
خَلَقَ الْاِ نْسَا نَ مِنْ عَلَقٍ.
اِقْرَأْ وَرَبُّكَ الْاَ كْرَمُ .
الَّذِيْ عَلَّمَ بِا لْقَلَمِ.
عَلَّمَ الْاِ نْسَا نَ مَا لَمْ يَعْلَمْ .

@reacto11mecha
reacto11mecha / canva-incorrect-render-image.js
Last active May 6, 2022 23:43
Canva incorrect image render after downloaded, but display correct when edit
// Run it step by step
// You need to search where is the upper div, for example
const node = document.querySelector('.uPeMFQ');
// wait until fetched correctly, check the network tab in your developer tools
fetch('https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js').then(res => res.text()).then(text => eval(text))
// It will print the image, just copy it
html2canvas(node).then(canvas => console.log(canvas.toDataURL('image/png'), '_blank'))

Buat kalo mau livestreaming local

ffmpeg -f v4l2 -i /dev/video1 -profile:v high -pix_fmt yuvj420p -level:v 4.1 -preset ultrafast -tune zerolatency -vcodec libx264 -r 10 -b:v 512k -s 640x360 -acodec aac -ac 2 -ab 32k -ar 44100 -f mpegts -flush_packets 0 udp://localhost:5000?pkt_size=1316

Buat duplikat kamera

ffmpeg -f video4linux2 -s 800x600 -i </dev/video mana> -probesize 32 -analyzeduration 0 -fflags nobuffer -flags low_delay -codec copy -f v4l2 /dev/video3
@reacto11mecha
reacto11mecha / husky-prettier-commitlint.sh
Last active June 16, 2022 19:48
Husky installer and other stuff
pnpm install --save-dev @commitlint/{config-conventional,cli} husky prettier eslint eslint-config-prettier
npm init @eslint/config
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
npx husky install
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit "$1"'
npx mrm@2 lint-staged
@reacto11mecha
reacto11mecha / pasrah.js
Created November 30, 2021 02:19
Cap cip cup......
const pilihan = "abcde".split("")
console.log(pilihan[Math.floor(Math.random() * pilihan.length)])
@reacto11mecha
reacto11mecha / genSimpulanCabangBiologi.js
Last active August 5, 2021 11:27
Otomasi tugas biologi ibu aat kelas 10 cabang biologi
const fs = require("fs");
const wiki = require("wikijs").default;
const cabang = fs
.readFileSync("./text_from_image.txt", "utf8")
.split("\n")
.filter((txt) => txt !== "");
const getPage = (page) =>
wiki({ apiUrl: "https://id.wikipedia.org/w/api.php" }).page(page);