This file contains 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 | |
namespace App\Helpers; | |
class Vite | |
{ | |
/** | |
* ensure below matches base: '/dist/' in vite.config.js otherwise HMR will not work | |
* found in https://github.com/vitejs/vite/issues/7839#issuecomment-1350538408 | |
*/ | |
const SUB_DIRECTORY = "dist"; |
This file contains 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
RequestHeader set X-Forwarded-For %{REMOTE_ADDR}s | |
RemoteIPHeader X-Forwarded-For |
This file contains 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
# mysql 3307 | |
frontend mysql3307-in | |
bind *:3307 name port3307 | |
mode tcp | |
default_backend mysql3307-in_mes | |
timeout client 1h | |
backend mysql3307-in_mes | |
mode tcp | |
option forwardfor |
This file contains 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
* * * * * /bin/sh /path/to/script/rreplica-watcher.sh 2>/dev/null >/dev/null | |
0 2 * * * /bin/sh /path/to/script/rreplica-collate.sh 2>/dev/null >/dev/null |
This file contains 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
requests.post('https://jsonplaceholder.typicode.com/posts', | |
headers={"content-type":"application/json"}, | |
json={ | |
"keyyy-nervate" :"valll-retroactive" , | |
"keyyy-polypody" :"valll-ladakin" , | |
"keyyy-unremonstrant" :"valll-unmetropolitan" , | |
"keyyy-exoticism" :"valll-monarchy" , | |
} | |
) |
This file contains 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
### HTTP REQUESTER ### | |
POST http://localhost/test/index.php | |
Content-type: application/x-www-form-urlencoded | |
POST_BODY: | |
k1=v1&k2=v2 | |
POST http://localhost/test/index.php | |
Content-type: application/json | |
Host: google.com | |
Cookie: SOMECOOKIE |
This file contains 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
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
# RewriteCond %{HTTP:X-Forwarded-Proto} !https # commenting this out because: cloudflare -> haproxyLoadbalancer -> php70server | |
RewriteCond %{HTTP:CF-Visitor} !https | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
This file contains 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 | |
if(isset($_POST["username"])){ | |
header("Content-type: text/plain"); | |
function challenge($secret, $response, $remoteIP = null, $action = "submit"){ | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL,"https://www.google.com/recaptcha/api/siteverify"); | |
curl_setopt($ch, CURLOPT_POST, 1); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array( |
This file contains 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 | |
SETLOCAL ENABLEDELAYEDEXPANSION | |
REM Windows Batch script to backup all mysql databases in a server | |
REM @author: Lenin Meza <lenin.meza.externo@prodecon.gob.mx> | |
REM Database information | |
SET dbhost="10.0.0.2" | |
SET dbuser="exporter" |
This file contains 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
# only allow specific IPs to access the page | |
# if no IP match, display 500.shtml | |
# put this right after RewriteBase / | |
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.2 | |
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.3 | |
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1 | |
RewriteCond %{REQUEST_URI} ^/test/util/url.* | |
RewriteRule .* /500.shtml [PT,L] |
NewerOlder