Skip to content

Instantly share code, notes, and snippets.

@mstrokin
mstrokin / gist:3c4a1a4b3c82584bbc44
Created February 4, 2016 12:17
catch exceptions/errors (die on fatal error)
function _catch_fatal_error() {
$error = error_get_last();
if (($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)|| ($error['type'] === E_USER_NOTICE)) {
// fatal error has occured
$msg = date("Y-m-d H:i:s")."|FATAL_ERROR: Request:" .$_SERVER['REQUEST_URI']."|". $error['type']. " |Msg : ".$error['message']." |File : ".$error['file']. " |Line : " . $error['line'];
echo $msg;
die();
}
}
function _log_error( $num, $str, $file, $line, $context = null )
@mstrokin
mstrokin / keyslol.js
Created November 13, 2025 22:35
Keys.lol automation script
async function automateWallets() {
// Wait for wallet rows to exist with 30s timeout
const walletPromise = new Promise((resolve) => {
const checkWallets = () => {
const wallets = document.querySelectorAll(".wallet");
if (wallets.length > 0) {
resolve();
} else {
setTimeout(checkWallets, 500); // Check every 500ms
}