First create global variables (in functions.php or as a mu-plugin):
<?php
/*
* CUSTOM GLOBAL VARIABLES
*/
function wtnerd_global_vars() {| <?php | |
| add_action('admin_init', function () { | |
| // Redirect any user trying to access comments page | |
| global $pagenow; | |
| if ($pagenow === 'edit-comments.php') { | |
| wp_redirect(admin_url()); | |
| exit; | |
| } |
| server { | |
| # see: http://wiki.nginx.org/Pitfalls | |
| # see: http://wiki.nginx.org/IfIsEvil | |
| listen 80; | |
| root /app; | |
| index index.html index.htm index.php; | |
| error_page 404 /index.php; | |
| # Make site accessible from http://set-ip-address.xip.io |
| location ~ ^(.*)\/wp-content\/uploads\/(.*)$ { | |
| try_files $uri @missing; | |
| } | |
| location @missing { | |
| rewrite "^(.*)/wp-content/uploads/(.*)$" "http://production-url.com$1/wp-content/uploads/$2" redirect; | |
| } |
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
| <?php | |
| //Simple Ajax Login Form | |
| //Source: http://natko.com/wordpress-ajax-login-without-a-plugin-the-right-way/ | |
| ?> | |
| //html | |
| <form id="login" action="login" method="post"> | |
| <h1>Site Login</h1> | |
| <p class="status"></p> | |
| <label for="username">Username</label> |
First create global variables (in functions.php or as a mu-plugin):
<?php
/*
* CUSTOM GLOBAL VARIABLES
*/
function wtnerd_global_vars() {| //require cyrpto module | |
| var crypto=require('crypto'); | |
| //key and iv should be same as the one in encrypt.php | |
| var decipher=crypto.createDecipheriv('aes-256-cbc','12345678901234561234567890123456','1234567890123456'); | |
| //since we have already added padding while encrypting, we will set autopadding of node js to false. | |
| decipher.setAutoPadding(false); | |
| // copy the output of encrypt.php and paste it below |
| ########################################### | |
| # IMPORTANT NOTE: | |
| # | |
| # As of asuswrt-merlin 380.67 Beta, you | |
| # can now configure SSL certificates from | |
| # the Webui, making these instructions | |
| # unnecessary. | |
| ########################################### | |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| <?php | |
| /** | |
| Plugin Name: Gravity Forms Cookies | |
| Plugin URI: http://ounceoftalent.com/ | |
| Description: Saves the query string parameters from a users visit to a cookie and allows these values to be populated via Gravity Forms' Dynamic Population feature. | |
| Version: 1.5 | |
| Author: David Smith | |
| Author URI: http://ounceoftalent.com | |
| License: GPL2 | |
| */ |