Fixing Outdated WooCommerce Templates

Most theme authors fix themes in a timely manner, but others won’t 🙁 . There are times you will need to update WooCommerce templates yourself. Its easier than what you think, but it may take you some time.

You need to determine what templates to update, make a backup of old templates and then restore any customizations.

Go to WooCommerce > Status> System Status. Scroll to the end of the page where there is a list of templates overridden by your theme/child theme and a warning message that they need to be updated. For example <aTheme>/woocommerce/cart/cart-totals.php version 2.2.0 is out of date. The core version is 2.3.0 and so on...

Before you do anything .Save a backup of the outdated templates!

Copy the default template from wp-content/plugins/woocommerce/templates/[path-to-the-template] and paste it in your theme folder found at: wp-content/themes/[path-to-theme]

It may take you a while to complete the entire process, but sometimes we have no choice.

If this issue keeps going with future WooCommerce updates and your theme keeps breaking consider changing your theme for a better supported one.

Contact me if you need help making these changes.

Install mkpasswd in Ubuntu

Hola,

I ran into the below issue while trying to install mkpasswd in Ubuntu.

sudo apt install mkpasswd

Reading package lists… Done Building dependency tree Reading state information… Done E: Unable to locate package mkpasswd

Turns out that mkpasswd is a utility part of the whois package. So, in order to get mkpasswd you have to:

sudo apt install whois

To confirm mkpasswd is installed you can run:

which mkpasswd

You should get the following:

/usr/bin/mkpasswd

If you like to learn more about Ubuntu I recommend getting this book Ubuntu Unleashed and also if you like to code with coffee visit my sister website cocotu.com

How to install Google Analytics code using the functions.php in WordPress

Using the WordPress functions file I was able to add the tracking code. It will then make the tracking code available to every page on your WordPress site.

You will need to add this code to your theme’s functions.php usually located at:

/wp-content/themes/<yourTheme>

You will need to add this code at the bottom of your functions.php file:

<?php
add_action('wp_head', 'wpb_add_googleanalytics');
function wpb_add_googleanalytics() { ?>
<!-- - Google Analytics -->
// Your Google Analytics code here
<!-- End Google Analytics -->

<?php } ?>


Key points during DevOps interview

Hola! Recently I went for an interview for a DevOps/IT Engineer position at NYC. I was skeptical about my skill set and if I would be able to talk about ‘DevOps’ stuff and etc…

To my surprise, I learned more about myself during that interview. I was able to talk about and respond to about 95% of their questions with confidence. I underestimated myself. I know more that what I thought. This may happen to many. But, I suggest you go out there and apply to jobs with fancy and scary ‘Job titles’.

Go and interview with a mindset of a spy. Ask questions about the technology the company uses, daily tasks, team environment and etc..Don’t be afraid!

Below is the main key points I discussed during the interview with this high-end Advertising company. I’m going over each and reviewing/improving my skills. I hope they can help you also.

  • SSH Keys.
  • AWS: Concentrate on the main services only.
  • Git basics.
  • Basic commands to Linux (CentOS/Ubuntu).
  • Apache virtual hosts.
  • Docker.
  • Automation scripts.
  • Ansible.
  • CI/CD.
  • Backup strategies/options/etc.
  • Load balancer basics.
  • Firewalls/Basic security.
  • SSL certificates installs.
  • SSO integration.
  • OAuth, APIs, OpenID, etc.

Let me know if you have any questions in the comments section. Cheers!

Enable Password Authentication on your droplet Digital Ocean

This one is quite simple. You will need to modify the ssh config file which is located at /etc/ssh/sshd_config.

Open the /etc/ssh/sshd_config file with your favorite editor.

Find or add the line PasswordAuthentication

Enter the value ‘yes’ next to PasswordAuthentication

It should look like:

PasswordAuthentication yes

Save and exit the file. The restart the ssh deamon with the below command:

service ssh restart – Ubuntu and family

service sshd restart – CentOS and family

How to Recover from Lost SSH Keys Digital Ocean

Hola! This happen on a couple of occasions to me. First, you will need to force your droplet to generate a new root password.

  1. Select your droplet from the Droplets menu.
  2. You will be presented with the option to reset root password. Click on the ‘Reset Root Password’ button and a new root password will be emailed to you.
  3. Log into the droplet via web console. This option is located right above the ‘Reset Root Password’ option.
  4. Once you click on ‘Launch Console’ button you can then enter root as your username and the password that was emailed to you. The web console supports copy/paste.
  5. Enter a new root password to replace the one that was emailed to you. Very important!
  6. You can now use your terminal to login if using Linux/Mac or use your SSH client if using some other OS. Use root for your username and the password you just created.

You should now have access to your droplet. Enjoy! Let me know if you have any questions. Use the comments sections to contact me. Thanks!

Ways of Contributing to Open Source

Open source code or software is available, usually with a license, for anyone to use. It’s common to collaborate on open source projects and use the material to build creative and exciting projects.

I compiled a list of sites you can use to contribute and gain experience:

Google Summer of Code:

Through their program, Google has compiled an expansive archive of open source foundations and projects. Explore the database to find out more. 

Open Source Machine Learning Frameworks:

Mainly designed for deep neural network models, TensorFlow is a tool for machine learning. Whether you’re new or already have experience, take some time to explore what is offered! 

Employers highly value contributions to and collaboration on open source. If you’re new to open source, get started with the resources below:

Github

Pick an Open Source project that you like and pick a task. Most open source projects host their repositories on GitHub. One of the great features of GitHub is that each repository comes with an issue tracker – just click the “Issues” link in the left sidebar of any of your favorite repositories to see where you can help. (Ex: jQuery’s issues)

The Beginner’s Guide to Contributing to Open Source Projects

This article does a great job of giving you ideas on how to contribute to open source projects in little and big ways – every little bit helps!

What can I do for Mozilla?

Contribute to Mozilla projects at this site, which asks you a series of questions about your interests or expertise and then makes suggestions.

Free Code Camp

This open source community gives people opportunities to learn to code and then give back by helping non-profit organizations.

Generate the DKIM domain key Google GSuite

Help prevent email spoofing for outgoing messages. DKIM adds an encrypted signature to the header of all outgoing messages. Email servers that get these messages use DKIM to decrypt the message header,  and verify the message was not changed after it was sent. 
 
Use the Google G Suite support link below to learn more:

https://support.google.com/a/answer/174126?hl=en&ref_topic=2752442

Authorize email senders with SPF GSuite

Set up SPF to prevent spammers from sending unauthorized emails from your domain. This type of spamming is called spoofing. Sender Policy Framework (SPF) is an email security method to prevent spoofing from your domain. 

Spoofing is a common unauthorized use of email, so some email servers require SPF. If you don’t set up SPF for your domain, messages could bounce or could be marked as spam.

Learn more at the Google support site using the link below:

https://support.google.com/a/answer/33786?hl=en