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 | |
| // Example usage | |
| // Set source location | |
| $sourcepath = "http://mysite.com/api/call/something"; | |
| // Set cache file | |
| $cacheName = "apicall.cache"; |
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
| 11.11.11.11/32 <- just the host 11.11.11.11 | |
| 11.11.11.0/24 <- the whole 11.11.11.0 network (254 ips) | |
| 11.11.0.0/16 <- the 11.11.0.0 network (64k ips) | |
| 11.0.0.0/8 <- the 11.0.0.0 network (16million ips) |
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
| module.exports = function(grunt) { | |
| // Project configuration. | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| banner: '/*! <%= pkg.name %> | <%= pkg.author %> | <%= grunt.template.today("yyyy-mm-dd") %> */\n', | |
| usebanner: { | |
| build: { | |
| options: { |
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
| # Protect wp-login | |
| <Files wp-login.php> | |
| order deny,allow | |
| deny from all | |
| # Localhost | |
| allow from ::1 | |
| allow from 192.168. | |
| # IP from users |
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
| # Source: https://www.websavers.org/how-to-speed-up-wordpress/ | |
| rewrite !\.(js|ico|gif|jpg|png|css|pdf|mov|mp3|eot|svg|ttf|woff|otf|txt|swf)$ /index.php break; | |
| rewrite /wp-admin/$ /wp-admin/index.php break; | |
| rewrite /$ /index.php break; | |
| # enable gzip compression | |
| gzip on; | |
| gzip_min_length 1100; | |
| gzip_buffers 4 32k; | |
| gzip_types text/plain application/x-javascript text/xml text/css; |
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
| module.exports = function(grunt) { | |
| // Project configuration. | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| banner: | |
| '/*! <%= pkg.name %>.js v<%= pkg.version %>\n' + | |
| ' * http://<%= pkg.name %>.com/\n' + | |
| ' *\n' + | |
| ' * <%= pkg.description %>\n' + |
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
| /** | |
| * Gravity Forms styles with Bootstrap 3 mixins | |
| * | |
| * GF settings: | |
| * - Output CSS = No | |
| * - Output HTML5 = Yes | |
| */ | |
| .gform_wrapper ul { | |
| .list-unstyled(); |
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 | |
| /** | |
| * pingdom.php | |
| * | |
| * This application will check your server swap, hard drive, cpu, and MySQL conditions. | |
| * It will then generate an appropriate XML file for a Pingdom HTTP Custom check. | |
| * | |
| * If any usage is above your preset thresholds, then a down message will be returned, | |
| * indicating that your server may be under more load than usual, hopefully, providing | |
| * a bit of advanced notice before a true failure due to lack of resources |
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 | |
| require('config.php'); | |
| $db = new mysqli(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE); | |
| $db->set_charset('utf8'); | |
| $result = $db->query('SELECT *, DATE(redirect.date) AS shortdate FROM redirect ORDER BY redirect.date DESC'); | |
| // If we have no results | |
| if ($result && $result->num_rows < 0) die('No results'); |
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 | |
| # Input database name | |
| echo "---" | |
| echo "wpinstall.sh - A WordPress installation shell script" | |
| echo "by Rutger Laurman" | |
| echo "---" | |
| echo "- Requires WP-CLI, make sure you install that first (http://wp-cli.org/)" | |
| echo "- Check file for configurations" | |
| echo "- Downloads, configures, installs WordPress, default theme and plugins" |