Skip to content

Instantly share code, notes, and snippets.

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

Muhammad Jazman kampar

🏠
Working from home
View GitHub Profile
@kampar
kampar / Duty of Care Risk Analysis (DoCRA) - An Infographic.html
Created June 4, 2025 21:51
Duty of Care Risk Analysis (DoCRA) - An Infographic, generated on 2025-06-05 by Google Gemini
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Duty of Care Risk Analysis (DoCRA) - An Infographic</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
@kampar
kampar / wav_to_mp3_32kbps.cmd
Created June 2, 2025 15:40
BATCH file to convert all WAV files into 32kbps bitrate mp3 files. You need to install ffmpeg first. I use this file to convert all Google NotebookLM WAV files that soo huge, and I'm afraid my students will object with them, if I share the raw.
@echo off
REM wav_to_mp3_32kbps.cmd
REM Batch script to convert .wav files to .mp3 at 32kbps.
REM It skips conversion if a .32k.mp3 version of the file already exists.
SETLOCAL EnableDelayedExpansion
echo Starting WAV to MP3 conversion (32kbps)...
echo ============================================
@kampar
kampar / Quiz Generator.md
Created June 2, 2025 15:34
Google Gemini Gems

Gemini Gem Configuration: Quiz Generator

Objective: To automatically generate approximately 50 high-quality multiple-choice questions (MCQs) from provided plain text input. Each MCQ will include a question, a hint, 5 answer choices, indication of correct answer(s), and detailed explanations for both correct and incorrect options.


@kampar
kampar / Flashcard Generator.md
Created June 2, 2025 15:32
Google Gemini Gems Instructions

Gemini Gem Configuration: Flashcard Forge AI

Objective: To automatically generate approximately 100 high-quality flashcards (Question/Answer pairs) in text or markdown format from provided plain text input.


@kampar
kampar / digipanel.user.js
Created May 23, 2025 14:33
remove limit 10 item per halaman
// ==UserScript==
// @name Show All Downloads simple-datatables
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Overrides the perPage setting for simple-datatables to show all entries.
// @author Your Name
// @match https://digipanel.id/*
// @grant none
// @run-at document-end
// ==/UserScript==
@kampar
kampar / convertInto32kbps_tempo1.5x.cmd
Created April 28, 2025 13:14
Convert all mp3 within current directory into 32kbps bitrate and tempo faster 1.5 times
@echo off
for %%F in (*.mp3) do (
if not exist "%%~nF.32x1.5.mp3" (
echo Converting "%%F" to "%%~nF.32x1.5.mp3" with 1.5× speed...
ffmpeg -i "%%F" -map_metadata 0 -filter:a "atempo=1.5" -b:a 32k "%%~nF.32x1.5.mp3"
) else (
echo "%%~nF.64x1.5.mp3" already exists, skipping.
)
)
echo All files processed!
@kampar
kampar / ffmpeg_allmp3_into_64kbps.cmd
Created April 28, 2025 12:57
Convert all mp3 within current directory into smaller 64kbps
@echo off
for %%F in (*.mp3) do (
if not exist "%%~nF.64.mp3" (
echo Converting "%%F" to "%%~nF.64.mp3"...
ffmpeg -i "%%F" -map_metadata 0 -codec:a libmp3lame -b:a 64k "%%~nF.64.mp3"
) else (
echo "%%~nF.64.mp3" already exists, skipping.
)
)
echo Done!
@kampar
kampar / iraise.js
Created February 15, 2024 20:22
console untuk buka semua KRS mahasiswa, enable dulu popup ya ...
const buttonsWithAttribute = document.querySelectorAll('button[data-title="BELUM ACC"]');
buttonsWithAttribute.forEach(button => {
const href = button.getAttribute('href');
window.open(href,'_blank'); // Logs the href attribute value for each button
});
@kampar
kampar / connectedpaper.js
Created February 7, 2024 03:26
JavaScript Console to export SVG graph from ConnectedPapers.com
svg=document.querySelector("#maingraph");
var serializer = new XMLSerializer();
var svg_blob = serializer.serializeToString(svg);
var svg_url = 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent('<?xml version="1.0" standalone="no"?>\n' + svg_blob);
var download_link = document.createElement('a');
download_link.href = svg_url;
download_link.download = 'your_file_name.svg';
document.body.appendChild(download_link);
download_link.click();
document.body.removeChild(download_link);
@kampar
kampar / tm3_to_wgs84.html
Last active February 6, 2024 22:23
Demo TM3 Kampar ke WGS 84 pakai JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Proj4js Sample</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.7.5/proj4.js"></script>
</head>
<body>
<h1>Proj4js Sample</h1>