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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
$all_forms = RGFormsModel::get_forms( null, 'title' ); | |
$form_options = array(); | |
foreach ( $all_forms as $form ) { | |
$form_options[ $form->title ] = $form->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 | |
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>' ); |
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
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
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
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
<?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
# 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
# ~/.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 |
OlderNewer