Skip to content

Instantly share code, notes, and snippets.

@bsh
bsh / Middleware-CSP.php
Created June 24, 2023 10:57 — forked from valorin/.env.example
CSP Middleware - the simple CSP middleware I use across all of my projects.
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Vite;
use Illuminate\Support\Str;
/**
* Simple Content Security Policy middleware.
@bsh
bsh / HowToDeleteAllCloudflareRecors.md
Created June 27, 2022 07:45 — forked from AidasK/HowToDeleteAllCloudflareRecors.md
Cloudflare delete all DNS records. Just go to cloudflare dns zones, open your browers developer console and paste this javascript code.

image

@bsh
bsh / mysql.php
Created November 26, 2018 09:04 — forked from billsuxx/mysql.php
<?php
/**
* Procedural drop in replacement for legacy projects using the MySQL function
*
* @author Sjoerd Maessen
* @version 0.1
*/
// Make sure the MySQL extension is not loaded and there is no other drop in replacement active
if (!extension_loaded('mysql') && !function_exists('mysql_connect')) {