Add Shortcuts In Mac

I have switched to Mac!!!

If you want to add shortcuts to certain directories so that you don’t have to type out the complete file path, you can add it to your .bash_profile file located in your /home directory.

Navigate to home:
$ cd ~

$ vi .bash_profile
This will create a new .bash_profile file if one doesn’t already exist. If one already exists, it will open the file using the vi terminal editor.

alias fcc='cd /Users/username/freecodecamp_projects'

This will allow you to exit the editor.

The ‘w’ stands for ‘write’.
The ‘q’ stands for ‘quit’.

You can also edit your Terminal inside your .bash_profile file and add emojis:


Closures in JS

I’m having a lot of trouble understanding how to use closures in JavaScript. A closure seems to be just a function within a function. I am still trying to find more examples of closures and their usage, so feel free to share any good ones you come across.

In the meantime, I found this Stack Overflow explanation pretty good:


Also finally found out what to call the ‘=>’ operator:

WordPress on Mac

Installing WordPress on a Mac?

I used XAMPP as my Apache server distribution cause I’m the most familiar with it. Luckily they have a Mac version that is similar to Windows:

After installing XAMPP, install WordPress: by placing the unzipped wordpress folder into your XAMPP/htdocs/ directory.

In your XAMPP folder, find manager-osx and double click on it to open the GUI. Click Start All.

Screen Shot 2017-02-12 at 10.43.02 PM.png

Then navigate to Http://localhost/phpmyadmin

Create a database for WordPress called whatever you want:


I called mine WordPress.

Open up the wp-config-sample.php file to edit the database information to the following:


Then rename the file to wp-config.php and save it.

Next, navigate to http://localhost/wordpress and follow the steps to install the WordPress application.

To be able to upload images and install templates using your WordPress application, you’ll need to run this command in your Terminal (of course change the path to the one that matches your directory:

chmod -R 755 /Applications/XAMPP/htdocs/Wordpress/wp-content

FCC – Twitch TV Project

Finally finished this project! I started this project during a pair programming session before the holidays and then just got busy and never finished it.

This project required using’s API. Working with API’s is always challenging, especially if the API is not well documented. Twitch’s API has a lot of documentation and there’s tons of information on how to get it to work in the FCC forums: (This link is also included in the project bullet-points.)

The first step was reading the forum and getting the correct API URL.
Using this: as the starting point.

After getting that URL, it became time to read the API documentation to see how to get the information we want. I focused on a list showing my favorite channels, but you could also have focused on users or videos. Twitch documentation here:

Endpoint Description
GET /streams/:channel/ Get stream object
GET /streams Get stream object
GET /streams/featured Get a list of featured streams
GET /streams/summary Get a summary of streams
GET /streams/followed Get a list of streams user is following

The URL I used to make the API call became:' + channelNames[i] with channel name being taken from an array of my favorite channels in a for loop

Once I got the URL down, I decided to build the front-end, just a basic skeleton of the page, and then focus on the JS. Wanting to use pure JavaScript, there was ALOT I had to learn. I read about making XMLHttpRequests to the API and how to handle the request response. I also read about jQuery’s .prepend() and .append() functions and how to translate their properties into JavaScript.

You can find my finished code here:

Designing this project was super fun! I played around with Google’s Material Design by using Material Design Lite.

You just insert these links into the of your HTML and you have access to the classes and icons:

<link rel="stylesheet" href="">
<link rel="stylesheet" href="">
<script defer src="">script>

To access the icons, go here:

To read more about the purpose and Do’s and Don’t’s of each component in Material Design go here:

View my final project here:

JavaScript Resources

So I’ve begun the dive into learning the JavaScript MEAN stack after becoming confident in writing vanilla JS. I have found some great resources recently and wanted to share:

This is by far my favorite resource for learning Express and NodeJS:

The guy breaks down and explains every line of code so that you have a better understanding of what it’s doing.

He also has a Part 2 that incorporates MongoDB:

Trello Board of Resources for learning Front-End and Git. I mainly look at the boards under React:

A great and easy way to develop responsive sites:

A great way to learn JS by playing a game:
Free Code Camp has a clan you can join:


Code4Startup- ReactJS for Newbies

This is a great tutorial for people new to React and looking for a simple and easy to understand introduction:

Several things to note about this tutorial:

  1. Grabbing the CDN links off the React website will not work with this tutorial. You must use the versions that Leo uses:
      <!-- The core React library -->
      <!-- The ReactDOM Library -->
  2. If you want to use Codepen to store the code, you must select Babel in the Settings as the JavaScript Preprocessor. Add the External JavaScript links in #1 and you’ll be all set!

My Pen:

Install MongoDB on Windows 10

To install MongoDB on your Windows 10 machine, follow the following steps.

  1. Go to MongoDB website and download the Community version of the package like you see in the image below:
  2. Once the download finishes, double click on the .msi file to start the installation. Install using the default settings, installing Complete package.
  3. Once installation completes, we need to add MongoDB to the Path in System Variables so that you can use the MongoDB commands in the command prompt. Right click on the Windows icon (the very left icon) on the taskbar and click on ‘System’.
  4. Click on Advanced System Settings on the left hand side and then when the window pops up, click on the Advanced tab and find Environment Variables…unnamed-qq-screenshot20160925205921
  5. Under the System Variables, double click on Path to add a new path for MongoDB:unnamed-qq-screenshot20160925210218
    You can also click on ‘New…’ button to add a new variable.
  6. Once the new window opens, add a new path for MongoDB according to your download path. If you used the default install settings, your install path for MongoDB should be similar to this:
    3.2 is the version number, so just double check what your version number is before adding it in. Then click OK to save the changes.
  7. Then open your command prompt and type:
    $ mkdir C:\data\db\
    This is where all your database collection information is stored. NOT where your actual database for your app is stored.
  8. Now to connect your path to this directory, type this in the command prompt:
    $ mongod --dbpath <path where you want your database for your app stored>
    For example:
    $ mongod --dbpath C:\Users\Ellen\myfirstapp\contacts

  9. To check if your MongoDB is set up correctly, you can always run
    $ mongod
    You’ll get a response like the following:


Kill a Program in Linux

I came across a really simple problem while using my Linux OS. I am used to the CTRL+ALT+DEL in Windows to open the Task Manager to close programs. I wasn’t sure how to do the same in a Linux environment.

To close a program in Linux from the command line, there are two options:

If you don’t know the name of the application, you can use this one. It will prompt you to click on the window of the application you are trying to close.
After clicking on it, the program will immediately close.

$ sudo xkill

If you know the name of the application, you can type:
$ sudo killall <name of application>
For example: $ sudo killall firefox

Creating Cron Job on RHEL7

Found a great resource for creating cron jobs in Red Hat Enterprise Linux 7:

(Yes it is from the creator’s website!) How cron jobs are laid out in /etc/crontab:

# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * username  command to be executed

So for example, if you want to create a cron job that will start XAMPP Apache server every weekday:

0 8 * * mon,tue,wed,thu,fri root /opt/lampp/laampp start

If you aren’t sure if you have cron or anacron available on your machine, you can run:

$ rpm -q cronie cronie-anacron

If you have cron packages installed, the command above will list them.