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
| #add 'node_modules' to .gitignore file | |
| git rm -r --cached node_modules | |
| git commit -m 'Remove the now ignored directory node_modules' | |
| git push origin master |
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(!function_exists('_log')){ | |
| function _log( $message ) { | |
| if( WP_DEBUG === true ){ | |
| if( is_array( $message ) || is_object( $message ) ){ | |
| error_log( print_r( $message, true ) ); | |
| } else { | |
| error_log( $message ); | |
| } | |
| } | |
| } |
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
| ps aux | grep mysql |
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 | |
| folders='Compressed Documents Images Music Programs Videos' | |
| ext_comp="*.zip *.tar.gz" | |
| ext_doc="*.htm* *.php *.txt *.css *.doc* *.pdf *.PDF *.ppt* *.js" | |
| ext_img="*.jp*g *.JPG *.png *.gif" | |
| ext_music="*.mp3 *.aac *.wma" | |
| ext_progrm="*.deb *.exe *.run" | |
| ext_vid="*.mp4 *.mkv *.flv *.avi *.webm *.wmv" |
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
| /** | |
| * Sets install skin strings for each individual plugin. | |
| * | |
| * Checks to see if the automatic activation flag is set and uses the | |
| * the proper strings accordingly. | |
| * | |
| * @since 2.2.0 | |
| */ | |
| public function add_strings() { | |
| if ( 'update' === $this->options['install_type'] ) { |
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
| // update_option( 'siteurl', 'http://dev.enl/environmental-leader-v3/' ); | |
| // update_option( 'home', 'http://dev.enl/environmental-leader-v3/' ); | |
| // function wpb_admin_account(){ | |
| // $user = 'admin'; | |
| // $pass = 'admin'; | |
| // $email = '[email protected]'; | |
| // if ( !username_exists( $user ) && !email_exists( $email ) ) { | |
| // $user_id = wp_create_user( $user, $pass, $email ); |
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
| sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/example.com.conf | |
| <VirtualHost *:80> | |
| ServerAdmin [email protected] | |
| ServerName example.com | |
| ServerAlias www.example.com | |
| DocumentRoot /var/www/example.com/public_html | |
| ErrorLog ${APACHE_LOG_DIR}/error.log | |
| CustomLog ${APACHE_LOG_DIR}/access.log combined | |
| </VirtualHost> |
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
| <? | |
| /** | |
| * Repeatable Custom Fields in a Metabox | |
| * Author: Helen Hou-Sandi | |
| * | |
| * From a bespoke system, so currently not modular - will fix soon | |
| * Note that this particular metadata is saved as one multidimensional array (serialized) | |
| */ | |
| function hhs_get_sample_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
| <?php | |
| /** | |
| * @file | |
| * Install, update and uninstall functions for the d8module module. | |
| */ | |
| function d8module_schema_otherdb() { | |
| $schema['mytable'] = array( | |
| 'description' => 'My table description', |
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
| DELETE a,b,c | |
| FROM {PREFIX}_posts a | |
| LEFT JOIN {PREFIX}_term_relationships b ON (a.ID = b.object_id) | |
| LEFT JOIN {PREFIX}_postmeta c ON (a.ID = c.post_id) | |
| WHERE a.post_type = 'POST_TYPE' AND a.post_date < '2014-01-01' |