Author Archives: Nicolas Rabier

Port 8080 Already In Use Spring Java Mac

Find out what application uses the port 8080 on Mac

If you develop web applications on your local environment, you will notice that the port 8080 is often set as default. Most likely one day you will face a situation where 2 running web servers want to bind the same port: 8080. Obviously, this is not allowed and you will get an error “Address already in use”. In Java environment, you will get this:

[console]java.net.BindException: Address already in use[/console]

The best way to sort this conflict is to follow these simple steps.

Step 1: find if a process listen on the port 8080

Open a terminal and enter this command:

sudo lsof -i :8080 | grep LISTEN

If you have already a running server on 8080, then the command will show the application running on this port. Note that the second value column is the Process Identification Number which is automatically assigned to each process when it is created on a Unix-like operating system.

user@computer$ lsof -i :8080 | grep LISTEN
java 28045 nicolas 125u IPv6 0x609c3697d21f8a2d 0t0 TCP *:http-alt (LISTEN)

Step 2: obtain more information about the process

Enter this command in the terminal.

ps -e {pid} | less

Note that you have to replace the {pid} by the value found in the result of the lsof command. In my case scenario, it’s 28045 and it’s Eclipse.

user@computer$ ps -e 28045 | more -w
PID TTY TIME CMD
28045 ?? 0:13.70 /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=64979 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Djava.security.egd=file:/dev/./urandom -noverify -XX:TieredStopAtLevel=1 -Dfile.encoding=UTF-8 -classpath /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/resources.jar:{more libraries…}:/Users/nicolas/.m2/repository/org/springframework/spring-jcl/5.1.4.RELEASE/spring-jcl-5.1.4.RELEASE.jar com.nicolasrabier.whatever.ServerApplication –spring.output.ansi.enabled=always

Step 3: kill the process

If you can no longer quit safely the web server process, there is still a way to kill the process with a command line in the terminal.

Note in the command you have to replace the {pid} by the value found in the result of the lsof command. In my case scenario, it’s still 28045.

sudo kill -9 {pid}

After running this command, no process listens on the port 8080 which means that you can start safely the other web server.

Replace Storefront Footer Credit

In your child theme functions.php file, paste the below:

add_action( 'init', 'remove_storefront_credit', 10 );

function remove_storefront_credit() {
	remove_action('storefront_footer','storefront_credit',20);
	add_action('storefront_footer','my_credit',20);
}

function my_credit() {
	echo '<div class="site-info">';
	echo '© [My Company Name] '.get_the_date('Y');
	echo '</div>';
}

Then replace [My Company Name] by the name of your company or whatever you want.

Free Softwares/Tools/Services to run your Small and Medium Business

You have a small and medium business (SMB) and you are on the budget to implement your IT infrastructure. Don’t worry! There is a multitude of good and free tools out there.

Email Service

Create an account on Gmail – https://mail.google.com

This Google account will allow you to access many useful collaborative services such as:

  • Calendar Service: Free Organise meetings & events – https://calendar.google.com
  • Contact Service: Free Directory of your contacts – https://contacts.google.com
  • Google Docs: Free alternative to Microsoft Word. Many users can work simultaneously on the same document. Versioning control. And more… – https://docs.google.com
  • Google Sheets: Free alternative to Microsoft Excel. Same as Google Docs, many users can work simultaneously on the same document. Versioning control. And more… – https://docs.google.com/spreadsheets/
  • Google Slides: Free alternative to Microsoft PowerPoint. Same as the other Google tools, many users can work simultaneously on the same document. Versioning control. And more… – https://docs.google.com/presentation
  • Google Drive: Free 15 GB cloud storage space – https://drive.google.com
  • And more…

Operating System

Install the free operating system on to your server to replace Windows or other Linux paid OS: Ubuntu Server

Remote Access

Install Chrome Remote Desktop which is a free remote control software, a good alternative to Teamviewer: How to install Chrome Remote Desktop on Ubuntu 18.04 – (pretty much same config for Ubuntu 16.04)

VPN

How to set up an OpenVPN Server on Ubuntu 16.04

Cloud Printing

Google Cloud Print on Ubuntu 16.04, in 10 minutes!

Dynamic Domain Name Service

How to set up Free DDNS Service on Ubuntu

Backup

How to install and configure ownCloud on Ubuntu 16.06

Usually, I couple ownCloud with a Dropbox account (not free) for redundancy.

ERP / E-commerce website

Install Odoo on an Amazon Lightsail server for $20 / month.

Open Source ERP – Odoo 11 – installation guide on Ubuntu 16.04

Best Wordpress Plugins

[WIP] The Best WordPress Plugins & Themes (No Affiliation)

As a WordPress developer, I thought keeping an organized list of the best and worst plugins. Here is simply my feedback based on my experience with those plugins. This post hasn’t been affiliated by any of the plugin brands.

Here is my Testing Environment for WooCommerce: https://shop.nicolasrabier.com

Color code:

  • ✅ Approved
  • ⚠ Some Warnings
  • ❌ Don’t Waste Your Time

✅ WooCommerce By Automattic

This is a great eCommerce tool. I love it even though it’s far from being perfect.

Pros

  • free
  • works with physical or digital products
  • compatible with many Themes such as StoreFront By WooThemes (same team as Automattic)
  • awesome partnership with Stripe & Paypal plugins
  • you can have a simple shop up and running fairly quickly

Cons

  • require good knowledge of the tool to set it up properly
  • the marketing strategy of Automattic is to use WooCommerce as an entry point to sell the most interesting plugins.
  • You would believe for compatibility reason it is better to use only Automattic plugins but this is not necessary true. e.g.
  • General knowledge in PHP and specifically in WordPress framework can help you a lot and save you money.

✅ Storefront Theme

Pros

  • Front page of the store looks very professional and legit. In order to properly visualize the front page the store needs products and categories in the catalog. Therefore I suggest to import the Dummy Data provided in WooCommerce to have a clear idea of the shop style. Check out this video tutorial that explains how to import the dummy data – https://www.youtube.com/watch?v=LpWZ8jr4Nvw

Cons

  • Many extensions aren’t free

Not sure

  • Compatibility with CDN. When you develop a website for global market you need to make sure the website is quickly reachable from anywhere in the world and nowadays this is achieved via a Content Delivery Network. I personally use CloudFlare coupled with MaxCDN which are integrated via W3TotalCache plugin.

✅ Storefront Sticky Add to Cart By WooThemes 

Love it

✅ Shortcodes Ultimate By Vladimir Anokhin

Best plugin to display information (sliders, box, columns, animations, etc.)

I systematically download it on all my instances of WordPress.

 Child Theme Configurator By Lilaea Media 

Nothing exciting here but it simply makes the creation of a child theme effortless.

Pros

  • Simple and fast

 W3TotalCache By Frederick Townes

This plugin speeds up the loading time of websites from anywhere in the world. This is critical to deliver the best experience to your impatient audience.

Cons

Pros

❌ WooThemes

Cons

  • Poor documentation
  • Support is unreliable
  • Expensive

Note reviews on Theme Grade – http://www.themegrade.com/woothemes-rating/.

 All-In-One WP Migration By ServMask

WooCommerce – Change “Related Products” text

This snippet allows to quickly change the “Related products” text which is shown by default at the bottom of a single product page in a WooCommerce shop.

Check out on my test environment: https://shop.nicolasrabier.com/product/woo-album-4/

Insert the code in functions.php of your child theme.

/**
* Change text strings
*
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/

function custom_related_products_text( $translated_text, $text, $domain ) {
  switch ( $translated_text ) {
    case 'Related products' :
      $translated_text = __( 'Other items you might like', 'woocommerce' );
      break;
  }
  return $translated_text;
}
add_filter( 'gettext', 'custom_related_products_text', 20, 3 );

 

Blockchain Rush: The Essentials

List of most of the cryptocurrencies and assets

Live charts

ICOs

Trading Exchange Platforms

Follow the development teams on their slacks to have more insights on the maturity, momentum and potential in short term/long term of the cryptocurrencies. It will provide relevant indicators in order to make a financial move.

Wallets (to be completed)

News:

Youtube Channel:

 

Personal Trading Interests

Check/Send email from other accounts in Gmail (Zuver.net.au)

If you have multiple email accounts, you can check them in Gmail. This document is a step-by-step guide to configure your gmail to act as webmail client.

From a computer

Get all messages from another account

  1. Sign in to the Gmail account you want to import to.
  2. In the top right, click Settings Settingsand thenSettings.
  3. Click the Accounts and Import or Accounts tab.
  4. In the “Check mail from other accounts” section, click Add a mail account.
  5. Type the email address of the other account, then click Next Step. (for example: test@frenchiesbistroandbrewery.com.au)
  6. Select “Import emails from my other account (POP3)” then click Next.
  7. Enter username which is often the email address (for example: test@frenchiesbistroandbrewery.com.au)
  8. Type your password.
  9. Enter the POP Server (for example: mail.frenchiesbistroandbrewery.com.au) and port “995“.
  10. Check the boxes next to the options below:
    • “Always use a secure connection (SSL) when retrieving mail”
    • “Label incoming messages”
    • Leave the other boxes unchecked.
  11. Click Add Account.
  12. Select “Yes, I want to be able to send email as {email address}” and hit Next and follow the instructions below from Item #6.

Send emails with another account

  1. Sign in to the Gmail account you want to configure.
  2. In the top right, click Settings Settingsand thenSettings.
  3. Click the Accounts and Import or Accounts tab.
  4. In the “Send mail as” section, click Add another email address.
  5. Enter the email address (for example: test@frenchiesbistroandbrewery.com.au)
  6. Click on Next Step >>
  7. Set SMTP Server. (for example: mail.frenchiesbistroandbrewery.com.au) and port “465
  8. Enter username which is often the email address (for example: test@frenchiesbistroandbrewery.com.au)
  9. Type your password.
  10. Click on Next.
  11. Then a confirmation code is sent your email address (for example: test@frenchiesbistroandbrewery.com.au). Copy this code.
  12. Paste the code in the field “Enter and verify the confirmation code” and hit Verify.

Send email by default with another email address

  1. Sign in to the Gmail account you want to configure.
  2. In the top right, click Settings Settingsand thenSettings.
  3. Click the Accounts and Import or Accounts tab.
  4. In the “Send mail as” section, click Make default aligned with your new primary email address.

Compose a new email and send it with another account

  1. Sign in to the Gmail account you want to use.
  2. Click Compose.
  3. In the section “From” of the email, you can choose the sender.