Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nmyers's full-sized avatar

Nicolas nmyers

View GitHub Profile
@nmyers
nmyers / webfaction-wp-cli.md
Created June 1, 2018 10:43 — forked from raquelmsmith/webfaction-wp-cli.md
How to install WP-CLI on WebFaction

I had difficulty installing WP-CLI properly on my WebFaction server because of the inability to use the sudo command to move the .phar file to the proper wp directory. The WebFaction support team was helpful as usual with some good instructions.

  1. Log in to your WebFaction account via SSH: https://docs.webfaction.com/user-guide/access.html
  2. Run the following command on the root directory: curl -so ~/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar It's probably a good idea to check the download URL there with the official WP-CLI installation instructions to make sure it hasn't changed.
  3. Run the following command: chmod u+x ~/bin/wp
  4. Check to make sure it's installed correctly with wp --info.
@nmyers
nmyers / bash_profile.sh
Last active June 1, 2018 08:39 — forked from aliang/Mac SSH Autocomplete
Add auto complete to your ssh, put into your .bash_profile - Mac SSH Autocomplete
_complete_ssh_hosts ()
{
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
comp_ssh_hosts=`cat ~/.ssh/known_hosts | \
cut -f 1 -d ' ' | \
sed -e s/,.*//g | \
grep -v ^# | \
uniq | \
grep -v "\[" ;