Dealing with :hover on Mobile in CSS Only

Dealing with a double touch :hover button is a pain for the mobile user. But :hover looks and works really well with mouse-pointer desktop environments. So how do we have both? Especially in the age of the hybrid touch desktop. I can’t believe I didn’t try this trick before.

Continue reading “Dealing with :hover on Mobile in CSS Only”


Natural Width and Height of Images

I stumbled upon a javascript readonly property that will return to you the original width and or height of an image loaded in the browser display.

Say for example you have an image that is 200px by 200px, and you style the image in CSS to be 100px by 100px. If you use jQuery’s width() ¬†or height() method, the return will be the current height or width. IE. 100px by 100px.

This makes perfect sense but…

Continue reading “Natural Width and Height of Images”

Setting the timezone on your Heroku App

So after the long hours of building my scheduling bot for Slack, I’m ready to deploy on Heroku, which is an awesome service by the way, but something is wrong, the times are all off.

Turns out my Heroku app was 4 hours off, more specifically my Heroku server running my app was 4 hours off.

Luckily this is an easy fix through the command line. Just set the time zone to a TZ database timezone, you can find them all here.

heroku config:add TZ="America/New_York" --app yourappname