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 | |
| // Generates a strong password of N length containing at least one lower case letter, | |
| // one uppercase letter, one digit, and one special character. The remaining characters | |
| // in the password are chosen at random from those four sets. | |
| // | |
| // The available characters in each set are user friendly - there are no ambiguous | |
| // characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option, | |
| // makes it much easier for users to manually type or speak their passwords. | |
| // | |
| // Note: the $add_dashes option will increase the length of the password by |
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
| // plug it in, plug it in | |
| (function($) { | |
| var paraCount = function() { | |
| return { | |
| options: { | |
| itemClass: 'awesome', | |
| baseUrl: "/", |
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
| <?php | |
| class FlashMessages { | |
| private $messages = array(); | |
| private $now = false; | |
| private static $instance = null; | |
| private function __construct() { | |
| // Save all messages | |
| $this->messages = $_SESSION['flash_messages']; |
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 | |
| /** | |
| * Obfuscator - The naive and trivial PHP Code obfuscator | deobfuscator | |
| * | |
| * generate() Generates a obfuscated string of given code | |
| * also gives the chunk value required by work() | |
| * work() Reverses the obfuscated string using chunk value given by generate() | |
| * to original code and then execute the code and returns response | |
| * |
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
| ^(?=.*\d)(?=.*[a-z])[\w~@#$%^&*+=`|{}:;!.?\"()\[\]-]{6,8}$ |
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;} | |
| * |
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 | |
| // Source: http://www.jonasjohn.de/snippets/php/headers.htm | |
| // Use this header instruction to fix 404 headers | |
| // produced by url rewriting... | |
| header('HTTP/1.1 200 OK'); | |
| // Page was not found: | |
| header('HTTP/1.1 404 Not Found'); |
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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
| require_once(BASEPATH . '../application/libraries/PayPal-PHP-SDK/autoload.php'); | |
| use PayPal\Rest\ApiContext; | |
| use PayPal\Auth\OAuthTokenCredential; | |
| use PayPal\Api\Capture; | |
| use PayPal\Api\Authorization; | |
| use PayPal\Api\Amount; | |
| use PayPal\Exception\PayPalConnectionException; |