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 require_auth() { | |
| $AUTH_USER = 'admin'; | |
| $AUTH_PASS = 'admin'; | |
| header('Cache-Control: no-cache, must-revalidate, max-age=0'); | |
| $has_supplied_credentials = !(empty($_SERVER['PHP_AUTH_USER']) && empty($_SERVER['PHP_AUTH_PW'])); | |
| $is_not_authenticated = ( | |
| !$has_supplied_credentials || | |
| $_SERVER['PHP_AUTH_USER'] != $AUTH_USER || | |
| $_SERVER['PHP_AUTH_PW'] != $AUTH_PASS |
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
| <!-- // The HTML (could be part of page content) // --> | |
| <input type="text" name="keyword" id="keyword" onkeyup="fetch()"></input> | |
| <div id="datafetch">Search results will appear here</div> |
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
| // THE BELOW WORKS FOR LOCAL WINDOWS MACHINE FROM A WAMP HOSTED CODEIGNITER SITE - CALL MADE FROM CODEIGNITER CONTROLLER | |
| $myCmd = "C://wamp//bin//wkhtmltopdf//wkhtmltopdf.exe http://proofofconcept.proximitystage.com/email-media-queries C://Users//mosley.j//Desktop//jonnny.pdf"; | |
| $result = exec($myCmd,$output,$var); | |
| var_dump($output); | |
| var_dump($var); | |
| // BELOW IS THE CMD LINE CODE/STEPS YOU NEED IN ORDER TO RUN THE SAME THING FROM PURE CMD LINE |
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/bash | |
| # CloudWays - Download local backups for all applications | |
| # ======================================================= | |
| # * Local backups must be enabled and available. See https://support.cloudways.com/how-to-download-a-full-backup/ | |
| # * Add your machine's SSH key to your server so this script needs no input. | |
| # * Backups will be saved inside a new folder with today's date within your nominated backup directory. (This might not be the date the backup was taken.) | |
| # * Only tested on Digital Ocean VPS so far. | |
| # Configuration |
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
| /** | |
| * A bookmarklet for viewing the largest contentful paint in a page. | |
| * Will show each LCP after the bookmarklet is clicked. | |
| * | |
| * To install: | |
| * 1. Copy the code starting from the line beginning `javascript:` | |
| * 2. Add a new bookmark in Chrome, and paste the code in as the URL. | |
| **/ | |
| javascript:(function(){ | |
| try { |
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 | |
| $terms = array( | |
| 'Birmingham - AL', | |
| 'Dothan - AL', | |
| 'Huntsville - AL', | |
| 'Montgomery - AL', | |
| 'Mobile - AL', | |
| 'Anchorage - AK', | |
| 'Fairbanks - AK', | |
| 'Juneau - AK', |
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 | |
| /** | |
| * Prevent top level permalink slugs that will cause conflicts. | |
| * | |
| * New rewrite slugs are introduced when CPTs or Custom Taxonomies are created. | |
| * This code adds a check when Pages or Posts are created, that their Permalink | |
| * does not conflict with one of the reserved top level slugs you define. | |
| * | |
| * In the case of a bad (i.e conflicting slug), WordPress appends a "-2" to | |
| * the permalink. |
OlderNewer