How to block email from a sender in Gmail using filters

You might be shocked to learn that Gmail doesn’t offer an official way to block senders. So, what are you supposed to do when you find yourself on an annoying mailing list or circular and there’s no easy way to unsubscribe?

Luckily, Gmail’s filtering system gives you the power to block a sender with a simple rule. Today, we’re going to show you how to do that in a few easy steps. You’ll discover how to set up the rule the first time round, then add additional email addresses that you want to block. Let’s get started: Continue reading “How to block email from a sender in Gmail using filters”

Stop your MacBook from sleeping with the Caffeinate command

A frequent bugbear with OS X on my MacBook Pro is that the screen will dim and then sleep if I leave it unattended for any length of time. That’s a nuisance because I can be running FTP operations or SSH sessions that I need to keep active and OS X will just go to sleep in the middle of them.
Continue reading “Stop your MacBook from sleeping with the Caffeinate command”

Handling pseudo selectors like :hover in SASS

SASS is an amazing CSS preprocessor that allows you to rapidly code websites using nested rules and variables and a lot more.

However, one thing the basic SASS instructions won’t tell you about is how to handle pseudo selectors when you’re nesting your rules. I’m talking about :hover, :before, :after and :visited states. Do you create a whole new CSS rule for a pseudo selector, or is there a way to nest them?

Continue reading “Handling pseudo selectors like :hover in SASS”

Command line tip: How to restart Mac OS X networking

Apple LogoIf you’re a terminal warrior like me, you’ll occasionally need to reboot the OS X network interface. There’s a quick way to do this through the command line – but first you need to know the identity of your network interface.

Run the ifconfig command in your terminal and find the interface with an IP address attached to it. On my MacBook Pro, the ethernet interface is en0 while the wireless interface is en1.  Yours may be similar.

Shutting down the network interface

Now that you’ve identified the interface, shutting it down and restarting it is a breeze. Run this command:

sudo ifconfig en0 down

And to start things back up again…

sudo ifconfig en0 up

That’s it. It’s a simple command that’s worth remembering – or bookmarking!

WordPress tip: Split up long posts into multiple pages

WordPress logoMany professional web publishers will opt to split up long posts into multiple pages: it breaks the article down into digestible chunks and also has the added benefit of reducing your site’s bounce rate and keeping readers on your site for longer. (Reducing the bounce rate of your website sends positive signals back to Google about the usefulness of your content.)

Continue reading “WordPress tip: Split up long posts into multiple pages”

iOS tip: Prevent font size scaling when device orientation changes

I’ve been messing around with mobile design this weekend. And among some of the mind-bending media queries and  cross device checking, I noticed that when I changed from portrait to landscape orientation on my iPhone, the font size seemed to scale up, upsetting the design.

After Googling around, as you do, I discovered a quick fix for this. It’s probably something that most mobile/responsive designers include as a matter of course these days, but simply adding this Webkit-specific line to your stylesheet fixes the awkward scaling issue when you rotate your phone screen:

body {
	-webkit-text-size-adjust: none;
}

Add the above to your existing body rules, and it’ll clear up orientation change weirdness.

Any other mobile design tips and tricks you want to share? Leave me a comment.