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>CSS drop-shadows without images</title> | |
| <style> | |
| body { | |
| padding:20px 0 30px; | |
| font:14px/1.5 Arial, sans-serif; | |
| text-align:center; |
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
| # FORCE PORT 80 (insecure / regular traffic) | |
| RewriteEngine On | |
| RewriteCond %{HTTPS} on | |
| RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
| ########################################################### | |
| #FORCE PORT 443 && REMOVE WWW. (secure / SSL) | |
| RewriteCond %{SERVER_PORT} 80 | |
| RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,L] |
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 | |
| /** | |
| * Calculate how much a profile is completed | |
| * | |
| * @param $profile | |
| * @return float|int | |
| */ | |
| function calculate_profile($profile) | |
| { | |
| if ( ! $profile) { |
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
| <script> | |
| function printDiv(divName){ | |
| var printContents = document.getElementById(divName).innerHTML; | |
| var originalContents = document.body.innerHTML; | |
| document.body.innerHTML = printContents; | |
| window.print(); | |
| document.body.innerHTML = originalContents; |
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
| # CSS/JS auto-versioning | |
| RewriteEngine On | |
| RewriteRule ^(.*)\.[\d]{10}\.(css|js)$ $1.$2 [L] |
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; |
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
| /** | |
| * 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
| ^(?=.*\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
| <?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 | |
| * |