Erik Hellman

developing with passion

Never Write hasClass Again

1
$('.navigation').hasClass('collapsed');

The code above can be easily refactored into the both shorter and easier to read:

1
$('.navigation').is('.collapsed');

‘Heroku Create’ Doesn’t Add Heroku as Remote

1
2
3
4
5
6
$ git push heroku master
fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

This problem occurs because you don’t have heroku listed as a remote, to add it, execute the following:

Manually Install a Font in Arch Linux

Installing a font manually is something that I always used to forget how to do since most of the fonts that I installed I got through either yaourt or some other package manager.

Reset Network Interface Naming Convention in Linux

I ran into this problem today on my old laptop that runs Arch. My network interfaces didn’t have persistent names, my wired network interface was called enp1s0 and my wireless wlp2s0, and when I plugged in an external WiFi dongle it named something like wlp0s2s7su8sau … or something like that. By no means am I an expert, but I finally managed to solve this problem.