Sal Aguilar's Bilingual Adventures in IT

computers are easier to deal with than people

Top 5 WordPress Tools for any WordPress Developer — February 18, 2016

Top 5 WordPress Tools for any WordPress Developer


As a professional working on WordPress sites, I wanted to share what are the tools that I use on my day to day WordPress Development and Management tasks, I hope these tools will make your life easier, as they did to me, so without further comments, let’s begin:

Chrome Developer Tools

faster-htmlcss-workflow-with-chrome-developer-tools
It’s incredible that many people who do WordPress sites are not aware of how useful your Chrome browser is. Google has made very great things with it and Dev Tools is a biggest part of it. You can find Javascript errors, see HTTP headers, do performance analysis and much much more. Its an essential part of what I use to diagnose issues with websites.

Website: https://developers.google.com/web/tools/chrome-devtools/

YouTube: https://www.youtube.com/watch?v=dJR-n8szgBc

wp-cli: Command Line Interface for WordPress

wp-cli

If you are a console lover like me, you’d appreciate this tool very very much. wp-cli is a terminal application built on PHP, that allows you executing a lot of wordpress management tasks such as updating & install plugins, adding users, password resets, etc and everything from the comfort of your favorite shell environment (I use and ❤ Oh my zsh). It requires you to have a unix like environment and PHP installed.

Website: http://wp-cli.org/ 

Twitter: @wpcli

GitHub: https://github.com/wp-cli/wp-cli

YouTube: WP-CLI – A Practical Guide For The Rest of Us WordCamp

Wocker: Docker for WordPress

Wocker Rapid development environment for WordPress

Wocker is a rapid development environment for WordPress. It’s based on Docker. It works on Linux and Mac. Since I am using a Mac, it made my life easier as I don’t need to setup Apache and MySQL each time I have to setup a new WordPress boilerplate! (AWESOME)

This allows you a great way to locally develop a site and then you can migrate it over to your web host using any of the available methods!

Author: Kite Koga (@ixkaito)
Website:
 http://wckr.github.io/

YouTube Tutorial: https://www.youtube.com/watch?v=F3OAm7qMeic

Presentation: http://www.slideshare.net/kaitokoga9/wocker-create-a-wordpress-development-environment-in-seconds

WordPress Codex

One thing I love the most about WordPress its all the documentation is available online, and codex @ wordpress.org is the best online resource for anything wordpress documentation, whether you are starting or you need a quick reference about any function of the CMS. +1 to Automatic for making such an awesome resource online available to us all.

Website: https://codex.wordpress.org/

The IDE: PHPStorm by JetBrains vs SublimeText

highlight-comparision

I know this is a very personal decision for each one of you, but to me PhpStorm is better than SublimeText when it comes to being a real IDE. Sure SublimeText has a lot (I seriously mean A LOT) of plugins that extend its functionality, but PHPStorm comes with everything I need from scratch.

Download PHPStorm: https://www.jetbrains.com/phpstorm/

PHPStorm & WordPress Tutorial: WordPress Development using PhpStorm

Download SublimeText: http://sublimetext.com/

SublimeText & WordPress tutorial: Setting Up Sublime Text for WordPress Development

Conclusion

This are the tools that I use and work for me, let me know if I missed other tool that you use on your daily tasks that simplify your work with WordPress. I would love to learn new tools!

Advertisements
Avoid SSH Timeouts on the Mac Terminal —

Avoid SSH Timeouts on the Mac Terminal


I admit it, I’m always with a lot of applications opened, Chrome with at least 6 tabs, Skype, Slack, PHPStorm or SublimeText, Airmail or Outlook for Mac, Photoshop and terminal.

I regularly login via SSH to VPS in Digital Ocean and AWS EC2 and then run some commands like:

wp plugin install wordfence

Then I go to the wordpress site and start adjusting the settings, but by the time I get back to the terminal (5 – 10 minutes), the SSH session is frozen, so I’m forced to open a new one. I honestly became tired of this, and I remembered that SSH was built on TCP and as such it should have some “Keep Alive” settings like on SIP (sorry I come from the call center world). And after some search online, I found that you can make this change both from the server side (SSHD: Secure SHell Daemon) or from your CLI (*nix, Linux & Mac).

Reduce SSH Timeouts from the server

Reduce SSH Timeouts from your computer

All you need to do is to setup your ssh client to send a “Keep Alive” signal to the server every certain amount of seconds. So you can add the following text to your ~/.ssh/config file:

Host remote-host
HostName remote-host.com
ServerAliveInterval 120

This basically tells your computer to send “keep alive” signals to remote-host.com every 120 seconds (2 minutes). That way the session will not get frozen for that server.

If you want to enable this for all of the hosts that you connect to, then simply add the following strings instead:

Host *
  ServerAliveInterval 120

This will setup the “keep alive” signal interval to 2 minutes for any host that you connect to via SSH.

After you finish editing the file, please make sure to change the permissions on the file using the following command:

chmod 600 ~/.ssh/config

And there you go, as simple as that! No more timeouts on my terminal app on my Mac OS El capitan MBP!

Upgrading to Debian Jessie 8.3 — January 31, 2016

Upgrading to Debian Jessie 8.3


Recently I became aware that there was an update to my favorite Linux, Debian. I have been using Debian Jessie 8.2 on my laptop (Dell XPS 14) since it came out and honestly I did not have any problems at all.

But recently I was requested to install a Linux server for a small app developed on Ruby on Rails. And honestly my first choice is, and probably always be Debian; unfortunately when I came to the meeting with the good folks who wanted my assistance, I was informed that the server was already installed and that the developer installed Ubuntu 14.04 on it. Well that shouldn’t be much of a problem, after all is Debian at heart.

But due to many issues with it (performance and others), I wiped the install and did a Debian Jessie 8.2 install on the beautiful Dell server. Everything went well during the installation, but the error stroke after the first boot 😦 video issues all over the place. I couldn’t see the console or screen due to some odd conflicts with the drivers and the Matrox video card. I did see several issues and complaints on some forums about the same that I was experiencing, but it has its positive side. The developer was using this server as a workstation and had the GUI installed and used tools like Atom and other things and was going to use the server to do the training. And now with the issues with video, I had the perfect excuse to make him use his laptop. #Win for me.

Today, I was happy to read that many video issues have been patched with 8.3 and I intend to do the upgrade on the server tomorrow night. But I did try to do the upgrade on my computer and everything went well.

How to upgrade to Debian 8.3 from Debian 8.x?

The process itself is pretty easy, on your terminal using an account with sudo rights, run the following commands:

sudo apt-get update

This command will request all the latest versions from all the repositories that you have on setup on your sources.list.

sudo apt-get upgrade

The upgrade modifier on apt-get compares the latest versions of software on the catalog available online against the local catalog of installed software on your machine, and tells you which are the ones that you can upgrade to newer versions.

sudo apt-get dist-upgrade

The dist-upgrade modifier, besides doing the same thing as upgrade it also changes the dependencies with newer version of packages. It will prioritize the most important packages to upgrade.

sudo reboot

After the reboot your computer should be now running full Debian 8.3 and you can verify it by running the following command:

lsb_release -a

The output should be something like this:

Distributor ID: Debian
Description: Debian GNU/Linux 8.3 (jessie)
Release: 8.3
Codename: jessie

And there you go, Debian Jessie 8.3 installed, enjoy!

If you face errors or have questions, let me know!

PS: Thanks to Christian Torres for the correction!

Stream Media from Debian to Xbox One — November 11, 2015

Stream Media from Debian to Xbox One


Hi there, if you have been reading my blog, you probably read my article about Streaming from Mac OS X to a Roku Streaming Device. Well now I am back for another one, but this time is from my Debian 8.2 (Jessie) to my XBOX One.

Requirements before we start

The setup is pretty simple, but before that let me first explain what are the requirements to accomplish this:

  1. Debian 8.2 installed on a computer with WIFI or connected to the same router as the XBOX.
  2. A XBOX One device that is connected to the same WIFI as the computer and that is up to date.
  3. A WIFI connection with internet connection, the faster the better.
  4. On the Debian box you must have root or sudo rights.

Let’s get started!

I’m going to divide this in 3 phases: Debian Setup, XBOX Setup and Playing time!

Debian SETUP

So for this you would have need to have terminal access to the computer running Debian 8.2 (Jessie). Once you are logged in you will type the following command on the terminal:

sudo apt-get install minidla

This will install minidla and all the requirements. MiniDLA is now called ReadyMedia, and its a very small and simple DLNA/UPnP media server that is compatible with all media players and OS: Windows, Roku, Smart TVs, Android, XBOX & Playstations. So this program, is a daemon itself that is installed on your Debian box and it shares all your media files with your network.

Once minidla is installed on your Debian box, it’s time to set it up. So let’s go back to the terminal and use our favorite text editor to edit the file, on this case I’m using vim:

sudo vim /etc/minidlna.conf

Once you have the file opened, look for the line that stats with: media_dir=
(or line 24 if your editor supports this) and then go ahead and change the value for your home folder so the statement looks something like this:

media_dir=/home/username/

Where username is the one that you use to login to your Debian box. I use that one because that way it will scan all the media on my home folder; however if you have your media stored elsewhere like on a USB Hard drive, then please use that full path instead of the one I used.

When you are done stating what is the media directory, save the file and close it. We will then now start the minidlna service on our console with the following command:

sudo service minidlna start

That command will start the sharing media service and now all computers (but Mac unless you use Plex) and media streaming devices will be able to see the media contents of the folder that we previously set on the minidlna.conf file. And that’s it on Debian 🙂

XBOX One setup

For the XBOX One setup is easier, just turn on the XBOX, make sure you have internet and then go to the XBOX Store and look for the Media Player app and install it if you do not already have it.

XBOX One Media Player

Once the apps finishes installing (its about ~ 45MB), go to your XBOX home screen >> My Games & Apps >> Apps >> Media Player and launch it.

Once you are on the app you should see the name of your computer with minidlna listed 🙂 on my case my computer is called debianXPS as you can see on the screenshot below:

XBOX Media Player showing DLNA

When you click on it with your XBOX One Remote, you will see all the folders listed. I navigated to videos and found all the videos listed as you can see below:

XBOX Media Player DLNA Movies

Just click on any of the videos to play them. And enjoy!

If you are facing issues about this not showing, please be sure that:

  • Debian box firewall has the minidlna ports opened.
  • Both Debian Box and XBOX One are on the SAME NETWORK.
  • That you setup correctly the media folder on minidlna.conf file and then restarted the minidlna service.

I am still looking for a way to use my XBOX as a secondary screen, so if you have a suggestion, let me know either on the comments or elsewhere!!

%d bloggers like this: