jordansworld.ca

Older posts can be found here.

Contents (newest to oldest)

No, Apple Music Didn't Delete Your Library

First published on 8 May 2016

I've noticed that there has been quite a few angry posts about 'Apple Music Deleted my iTunes!' go zooming up my Facebook newsfeed. This post will hopefully clear up some of that confusion.

I'd first like to preface this by saying: No, Apple Music didn't delete your iTunes Library. You did.

Back in January when I purchased my first MacBook Pro, the salesman at the store suggested that I should take a look at Apple Music when I was finished setting up iTunes. I was particularly interested at the notion of being able to stream my 6,000-some song library to my phone without using an app like Subsonic. So, I took the iGenius's advice and activated the free, three month trial for Apple Music, figuring I had nothing to lose (on a related note, disabling the auto-billing when the three months ended was a bit of a pain, see here for how to do this).

Upon activating Apple Music, two things occur: 1) it started scanning my iTunes Library in an attempt to match my songs with the ones that Apple Music offers, and 2) the Apple Music tab appeared at the top of the iTunes window. Let's talk about 1) since this seems to be where most of the confusion comes from. To best know what's going on here, you'll need to show the 'iCloud Status' column in your music library. The terms that I use here come right from that column. When the service first starts scanning your library, the iCloud Status of every song will change to 'Waiting'. All this means is that individual song has yet to be dealt with.

So far so good, right? Once Apple Music is finished scanning a song, one of two things will happen: 1) if the song exists in Apple Music's library, the status will change to 'Apple Music', or 2) the song does not exist in Apple Music, so iTunes will upload the song to your iCloud Music Library. In this case, the status will say 'Uploaded'. Do keep in mind that on your computer, nothing has changed. Your music files, be they MP3's, AAC's, ALAC's or even WAV's, are still exactly where they were before (if you use the default settings, on a Mac this'll be in /Users/YOUR_NAME/Music/iTunes and on Windows it'll be in C:\Users\YOUR_NAME\Music\iTunes).

To reiterate: your files have not been changed at all. Read it again. Your. Files. Have. Not. Been. Changed. So where exactly does the misconception that Apple Music kills your library come from? Based on my experience in using the service, the problem is due to a single, poorly designed dialog box:

This is the popup that you get when you try to delete any song when you have Apple Music, and it's probably not the best example of good interface design. Clicking 'Delete Song' doesn't actually delete the song in question. Instead it removes the song from your iCloud Music library and sets its iCloud Status back to 'Waiting'. Clicking 'Remove Download' on the other hand deletes the music file from your computer and instead uses the version on the Apple Music servers. This is also the version that contains the DRM that causes the song to be unplayable when you cancel your subscription. The lesson here? Don't click 'Remove Download' on the computer that you keep your music files on. This option is intended for people who have multiple computers or phones connected to their Apple Music account. Note that this option is perfectly safe to click on secondary computers, just make sure to not click it on your primary computer.

So to conclude, no, Apple Music didn't brutally murder your iTunes Library. You did by clicking 'Remove Download' in an effort to save disk space. So please, stop crowding my Facebook newsfeed with posts that your library got deleted. First of all that problem can easily by avoided by reading the dialog box. Second, you should have a current backup of your library anyway. If you don't, go make one right now, you'll thank me later.



How to Setup a Simple Personal Website

First published on 15 April 2016

I suppose this is kind of an apt way to kick off my blog. In this post, I will attempt to show you how setup your own personal website.

Prerequisites

You will need to have the following tools installed on your server/VM as well as basic knowledge on how to use them.

You will also need a git repository created on the service of your choice (GitHub is not a bad one).

Step 1 - Install the above software

Assuming you have a base install of Ubuntu or Debian, run the following command at the terminal:

sudo apt-get -y install apache2 git

That command will download and install Apache and git, along with any dependencies. The -y switch just bypasses the 'do you want to install n MB of packages' prompt; feel free to leave it out if you want.

Step 2 - Take ownership of the web directory

The web directory is the folder that contains all the files that make up your website. By default, this folder is 'owned' by the root user, which isn't particularly helpful. To take ownership, run the following command:"

sudo chown -R USERNAME /var/www

Where USERNAME is your username, so in my case, I'd use:

sudo chown -R jordan /var/www

This command sets the owner of the /var/www directory to the specified user. The -R switch means to apply this change recursively to any files/folders inside of /var/www.

Step 3 - Clone your git repository on your development machine

On the machine you'll be using to develop your website, clone your git respository per your git service's instructions. Once that is finished, add a file (README.md is not a bad idea if you're using GitHub) to your git repo and commit it. This file can be empty. Now, push your changes to the server.

Step 4 - Clone your git repository on the server

Now on your server, change to the /var/www/html directory:

cd /var/www/html

Then clone your git repository:

git clone http://mygitserver.ca/user/mysite.git .

Replace http://mygitserver.ca/user/mysite.git with the URL provided by your git provider. You may need to enter your credentials here. Make sure you include the dot at the end of that command.

Step 5 - Modify your Apache configuration

Open your Apache configuration file in the text editor of your choice. The following command uses the nano text editor:

sudo nano /etc/apache2/apache2.conf

At the end of the file append the following lines:


<Directorymatch "^/.*/\.git+/">
  Order deny,allow
  Deny from all
</Directorymatch>

<Files ~ "^\.git">
  Order allow,deny
  Deny from all
</Files>
        

The above configuration blocks all requests to the /.git directory from the outside world. This is done to prevent others from snooping on your commit history.

Done

That's it, now you can write your website on your development machine. When you want to push your changes to the server, simply commit your code using git and then push it to the remote. Then, on the server run:

git pull

This will pull your changes from the remote server to your web server. Refresh your browser to see the changes.