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 | |
| namespace App\Http\Middleware; | |
| use Illuminate\Support\Facades\Redirect; | |
| use Closure; | |
| class XSS | |
| { | |
| /** |
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
| // FILE PATH: /resources/js/app.js | |
| require('./bootstrap'); | |
| // Import Service Worker Registry | |
| require('./extensions/sw-registry'); | |
| import Vue from 'vue'; | |
| ... |
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"> | |
| <title>MediaCapture and Streams API</title> | |
| <meta name="viewport" content="width=device-width"> | |
| <link rel="stylesheet" href="main.css"> | |
| </head> | |
| <body> | |
| <header> |
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
| <select name="Location" id="Location" required> | |
| <option value="" disabled selected>Select The City</option> | |
| <option value="Islamabad">Islamabad</option> | |
| <option value="" disabled>Punjab Cities</option> | |
| <option value="Ahmed Nager Chatha">Ahmed Nager Chatha</option> | |
| <option value="Ahmadpur East">Ahmadpur East</option> | |
| <option value="Ali Khan Abad">Ali Khan Abad</option> | |
| <option value="Alipur">Alipur</option> | |
| <option value="Arifwala">Arifwala</option> | |
| <option value="Attock">Attock</option> |
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 | |
| function slugify($string, $replace = array(), $delimiter = '-') { | |
| // https://github.com/phalcon/incubator/blob/master/Library/Phalcon/Utils/Slug.php | |
| if (!extension_loaded('iconv')) { | |
| throw new Exception('iconv module not loaded'); | |
| } | |
| // Save the old locale and set the new locale to UTF-8 | |
| $oldLocale = setlocale(LC_ALL, '0'); | |
| setlocale(LC_ALL, 'en_US.UTF-8'); | |
| $clean = iconv('UTF-8', 'ASCII//TRANSLIT', $string); |
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
| #!/bin/sh | |
| CRTPATH=$(pwd -W) | |
| for i in *.key ; do | |
| DOMAIN=${i%.key} | |
| cat << EOF > openssl_$DOMAIN.conf | |
| [req] | |
| distinguished_name = req_distinguished_name | |
| req_extensions = v3_req | |
| prompt = no | |
| [req_distinguished_name] |
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
| /** | |
| * Optimize image image | |
| * | |
| * https://developers.google.com/speed/docs/insights/OptimizeImages | |
| * -sampling-factor 4:2:0 -strip -quality 85 -interlace JPEG -colorspace sRGB | |
| * | |
| * @access public | |
| * @param string $filePath Path of the file | |
| * @return string Raw image result from the process | |
| */ |
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 | |
| // This can be found in the Symfony\Component\HttpFoundation\Response class | |
| const HTTP_CONTINUE = 100; | |
| const HTTP_SWITCHING_PROTOCOLS = 101; | |
| const HTTP_PROCESSING = 102; // RFC2518 | |
| const HTTP_OK = 200; | |
| const HTTP_CREATED = 201; | |
| const HTTP_ACCEPTED = 202; |
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
| (function() { | |
| var overlay = document.createElement('div'); | |
| Object.assign(overlay.style, { | |
| position: 'fixed', | |
| top: 0, | |
| left: 0, | |
| width: '100vw', | |
| height: '100vh', | |
| zIndex: 99999999, | |
| background: 'transparent', |
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
| /** | |
| * Prevent body scroll and overscroll. | |
| * Tested on mac, iOS chrome / Safari, Android Chrome. | |
| * | |
| * Based on: https://benfrain.com/preventing-body-scroll-for-modals-in-ios/ | |
| * https://stackoverflow.com/a/41601290 | |
| * | |
| * Use in combination with: | |
| * html, body {overflow: hidden;} | |
| * |
NewerOlder