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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
# Attempt to load files from production if | |
# they're not in our local version | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule wp-content/uploads/(.*) \ | |
http://{PROD}/wp-content/uploads/$1 [NC,L] | |
</IfModule> |
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 | |
/** | |
* Dynamically populate the values for Gravity Form drop downs | |
* | |
* @param array $form | |
* @return mixed | |
* @access public | |
*/ | |
function az_gravityforms_dynamic_dropdown_values( $form ) { |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
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
# List of messages in teh queue and get the MESSAGE_ID of the message | |
mailq | grep "search something" | |
# Read specific message by its MESSAGE_ID | |
postcat -q MESSAGE_ID |
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 | |
add_action( 'vc_before_init', 'zaroutski_vc_register_banner_section_shortcode' ); | |
/** | |
* Register banner section content element in Visual Composer | |
*/ | |
function zaroutski_vc_register_banner_section_shortcode() { | |
vc_map( array( |
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
if ( my_variable !== parseInt(my_variable, 10) ) { alert("my_variable is an integer"); } |
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
1) Run: | |
sudo a2enmod rewrite | |
2) Restart the webserver to apply the changes: | |
sudo service apache2 restart | |
3) Add the following to the virtual host configuration file /etc/apache2/sites-available |
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
mysql -u username -ppassword databasename < filename.sql |
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
composer create-project johnpbloch/wordpress-project my-site 0.1.3 |
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 | |
define( 'DB_NAME', '' ); | |
define( 'DB_USER', '' ); | |
define( 'DB_PASSWORD', '' ); | |
define( 'DB_HOST', '127.0.0.1' ); | |
define( 'WPLANG', '' ); | |
define( 'WP_DEBUG', true ); | |
define( 'SCRIPT_DEBUG', true ); | |
define( 'WP_SITEURL', 'http://<domain-name>/wp' ); | |
define( 'WP_HOME', 'http://<domain-name>' ); |