Skip to content

Instantly share code, notes, and snippets.

View Cojad's full-sized avatar
🤣
Hacking for blockchain

Jason Chiang Cojad

🤣
Hacking for blockchain
View GitHub Profile
@Cojad
Cojad / ato.cmd
Last active June 1, 2021 04:48
ato
cscript //B "%windir%\system32\slmgr.vbs" /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
cscript //B "%windir%\system32\slmgr.vbs" /skms zh.us.to
wscript "%windir%\system32\slmgr.vbs" /ato
cd "C:\Program Files (x86)\Microsoft Office\Office16"
cscript OSPP.VBS /sethst:zh.us.to
cscript OSPP.VBS /act
@Cojad
Cojad / uefi-x64.exe
Last active June 9, 2021 23:19
tiny exe to detect uefi/legacy boot
@Cojad
Cojad / yaml.userscript.js
Last active November 4, 2022 07:09
Load npm js in tampermonkey
// ==UserScript==
// @name load jQuery and yaml on 越南商店
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://sites.google.com/view/nicsolas/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=google.com
// @require http://code.jquery.com/jquery-3.4.1.min.js
// @require https://github.com/plohoj/userscript-requirejs/releases/download/0.0.2/userscript-require.js
@Cojad
Cojad / fpm_get_status_with_auth.php
Last active November 26, 2024 15:08 — forked from EhsanCh/fpm_get_status.php
PHP-FPM real-time status page (Single file without the need for web server configuration) with simple auth
<?php
// Use HTTP Basic Authentication for verification
$username = 'admin';
$password = 'Passw0rd!'; // Please use your own password!!
// Check if the client has provided correct credentials
if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] !== $username || $_SERVER['PHP_AUTH_PW'] !== $password) {
// Send authentication request headers
header('WWW-Authenticate: Basic realm="Restricted Area"');
header('HTTP/1.0 401 Unauthorized');