This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
const scripts = [ | |
'https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js', // ✅ Valid | |
'https://example.com/nonexistent-script.js', // ❌ 404 — THIS WILL BREAK SEQUENCE | |
'https://cdn.jsdelivr.net/npm/[email protected]/moment.min.js' // ⛔ Won't load due to previous error | |
]; | |
try { | |
const loadedScripts = await loadScriptsSequentiallyEnhanced(scripts, { timeout: 5000 }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"preset": "per", | |
"rules": { | |
"align_multiline_comment": true, | |
"array_indentation": true, | |
"array_syntax": true, | |
"blank_line_after_namespace": true, | |
"blank_line_after_opening_tag": true, | |
"combine_consecutive_issets": true, | |
"combine_consecutive_unsets": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Injects an external resource (script or stylesheet) into the current HTML document | |
* | |
* @param {string} url - The URL of the resource to inject | |
* @param {string} type - The type of resource ('script' or 'style') | |
* @param {function} [callback] - Optional callback function (only for scripts) that executes after loading | |
*/ | |
function injectResource(url, type, callback) { | |
// Variable to hold the DOM element we'll create | |
let element; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Script Loader Example</title> | |
</head> | |
<body> | |
<h1>Script Loading Example</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$points = [ | |
[3, 4], [7, 9], [12, 15], // Coordinates | |
[18, 5], [20, 25] | |
]; | |
$grid_size = 10; | |
$grid_density = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: ============================ | |
:: Batch File for System Cleanup and Memory Release | |
:: ============================ | |
:: Ensure the script is run as administrator | |
net session >nul 2>&1 | |
if %errorLevel% neq 0 ( | |
echo Please run this script as administrator. | |
pause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// composer require sebastiandevs/simplethenticator | |
use Illuminate\Http\Request; | |
use src\SimpleAuthenticator; | |
use Illuminate\Support\Facades\Route; | |
Route::get('/', function () { | |
$auth = new SimpleAuthenticator(6, 'SHA1'); | |
try | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### ENVIRONMENT VARIABLES ### | |
#SetEnv PHP_VER 5 | |
#SetEnv REGISTER_GLOBALS 0 | |
### MAIN DEFAULTS ### | |
Options All -Indexes | |
DirectoryIndex index.html index.htm index.php | |
AddDefaultCharset UTF-8 | |
### MIME TYPES ### |
NewerOlder