Categories
Snippets

Array.push()

In our review of Array.indexOf() we looked at using the check for -1 assigned to the indexOf() as an indication that that item was not part of the array. With […]

Categories
Snippets

Array.indexOf()

Using the indexOf() call in javascript allows you to… Get the index of the Array item you pass across Check to see if an item exists within an Array If […]

Categories
Snippets

xvfb-run: error: Xvfb failed to start

When trying to run Sitespeed.io in two different terminals on the same server I received the error that Xvfb could not run. By adding -a as an argument it will […]

Categories
Snippets

List directory with file sizes on Linux (ubuntu)

du -sh * I wanted to be able to list ls the files and folders on the server to find out which ones were taking up the most disk space […]

Categories
Snippets

Restoring mySQL database from the file system MT

When you get a flat backup of your server the SQL is useless to you. Unless you’ve run SQL exports and backups your self you’re going to have to recover […]

Categories
Snippets

Warning remote host identification has changed ssh

This was another fun error message that I received while putting back together my hacked server. This appears when trying to SSH into the Media Temple server through the Terminal […]