- Download getcomposer.org/composer.phar to your account's home directory —
/home/username
. - Edit
.bashrc
file in same directory by addingalias composer='/usr/local/php56/bin/php-cli ~/composer.phar'
line. Updatephp56
part to current relevant version, if necessary. - Restart SSH session or run
source ~/.bashrc
to reload config. - Use
composer
command!
This file contains 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
> Thank you for reaching out to Autonomous! I am sorry to hear that you are having some trouble with your SmartDesk | |
> but I will be glad to assist. It sounds like your system needs a "hard reset" can I please have you follow these | |
> steps thoroughly. | |
Reset Steps: | |
1. Unplug the desk for 20 seconds. Plug it back in. Wait a full 20 seconds. | |
2. Press the up and down buttons until the desk lowers all the way and beeps or 20 seconds pass. | |
3. Release both buttons. | |
4. Press the down buttons until the desk beeps one more time or 20 seconds pass. |
This file contains 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_action( 'pre_get_posts', array( $this,'function_pre_get_posts' ) ); | |
function function_pre_get_posts(){ | |
// you can't use the query->set here for tax_query | |
// as tax query has already been made | |
// so you need to need add youself to any | |
// existing tax query | |
$tax_query = array( | |
'taxonomy' => 'tax_name', |
This file contains 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 | |
// Disables sticky Strict Standards warnings. Good for poorly developed plugins. | |
// Put this file in mu-plugins | |
if ( WP_DEBUG ) { | |
error_reporting( E_ALL & ~E_STRICT ); | |
} |
In this episode, Jay McGavren shares some of his favorite tricks for working in the shell. No unreadable sed or awk scripts here. Just simple, solid tips you can use every day, including time savers with find, less, ssh, and command-line Ruby.
http://programmer.97things.oreilly.com/wiki/index.php/The_Unix_Tools_Are_Your_Friends
This file contains 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 | |
/** | |
* Quick way to handle redirects for old pages | |
* | |
* From Happiness Bar at WordCamp SF 2012 | |
*/ | |
add_action( 'init', 'mea_redirects' ); | |
function mea_redirects() { | |
$mea_redirects = array( | |
// Enter your old URI => new URI |
This file contains 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 | |
$args = array( | |
'post_type' => array( 'type1', 'type2', 'type3' ), | |
'posts_per_page' => -1 | |
); | |
$myquery = new WP_Query( $args ); | |
$type1 = 0; $type2 = 0; $type3 = 0; $count = 0; | |
while ( $myquery->have_posts() ) : $myquery->the_post(); |
This file contains 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 wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com'); |
NewerOlder