How to remove an IP from the CBL (Composite Blocking List)
Today I was introduced to something called the CBL, or the Composite Blocking List. This is one of several Spamhaus projects that’s there to make sure IP’s are blacklisted when they’re sending spam. You can check if your IP’s are OK at http://www.spamhaus.org/lookup/ The CBL is a separate website in which you can also lookup IPs. Spamhaus will tell you if that’s the case and direct you to the CBL here: http://www.abuseat.org/lookup.cgi Even though my IP was otherwise fine, it was listed in the CBL, and Yahoo...
read moreHow to set the hostname on CentOS 7
CentOS 7 has a nice command called hostnamectl. With it we can display the current hostname, and set any of the three types of hostname: static hostname (something like example.com) transient hostname (anything you like, assigned when using DHCP) pretty hostname (something like Jay’s MacBook Pro) By default, a CentOS installation comes back with localhost.localdomain – but that’s not meaningful if you see lots of localhosts on the same network. If the IP of the box does not change, we can set the static hostname like this:...
read moreHow to change fonts in TwentyFifteen by Automattic
TwentyFifteen uses the Noto Serif font. It looks swish and comes with an Apache license, and it can be pulled from Google Fonts too. It’s a fine font indeed – but individuals that we are, it may not be for everybody. It’s easy to change it to something else though, and in this article I’ll show you how. By default, TwentyFifteen and Noto Serif looks like this: If we want to change this to something else, we must first import said font into our style sheet, and then declare it for a couple of classes. In this example...
read moreHow to avoid hyphenations in TwentyFifteen by Automattic
By default, TwentyFifteen will hyphenate text on posts and pages. This works well for most, but some find this feature annoying. It’s easy to override with a small CSS tweak – let me show you how. Here’s what a post might look like by default: Notice the hyphenations in lines 3 and 4. Now add the following to your stylesheet: /* stop hypenating words */ .entry-content, .entry-summary, .page-content, .comment-content { -webkit-hyphens: none; -moz-hyphens: none; -ms-hyphens: none; hyphens: none; word-wrap: normal; } Now the...
read moreHow to use the new Apple System Font SAN FRANCISCO on your website
Apple have a new System Font in El Capitan and all of their other products starting 2015: it’s called San Francisco. It’s very similar to their previous font Helvetica Neue, but apparently San Francisco is better for your eyes (not to mention the fact that Helvetica Neue isn’t owned by Apple, and obviously we can’t have that). If you’ve tried searching for San Francisco on your Mac’s Font Book app, you’ll notice that it doesn’t seem to exist. Likewise, if you’re trying to use it in CSS it...
read moreOS X Server vs. Parallels Desktop – Overhead Differences
Ever wondered if there’s a difference in overhead and memory usage when you’re using a VM instead of OS X directly? Here’s a comparison for website hosting. The above graph shows the difference of hosting one of my websites for the last few days on OS X Server (in blue), and in a CentOS VM under Parallels Desktop 10 on the same hardware (in red). The traffic logs show that the amount of requests and visitors has remained the same, so we can deduce that the load put on either OS X and the VM is the same. There is a little...
read moreHow to install MySQL on Mac OS X El Capitan
There are several ways to install MySQL on your Mac, for example: compile from source use the Homebrew package manager (http://brew.sh) use a nifty script courtesy of Mac Mini Vault (http://git.io/eUx7rg) or use the dedicated MySQL installer package (recommended) I recommend the dedicated installer because it’s the only package that will also add a convenient Preference Pane for starting and stopping the service. In this article I’ll focus on the latter, and I’ll also talk you through how to add MySQL to the PATH variable...
read moreHow to disable SSH access from everywhere except for certain IPs in CentOS 7
Here’s how to do it: firewall-cmd --zone=internal --add-service=ssh --permanent firewall-cmd --zone=internal --add-source=1.2.3.4/32 --permanent firewall-cmd --zone=internal --add-source=5.6.7.8/32 --permanent firewall-cmd --zone=public --remove-service=ssh --permanent This declares an internal zone with two IPs (add as many or as few as you like) and subsequently removes the SSH service from the public zone altogether. As a result, any other IP gets a message such as “Connection refused” when trying to connect via SSH. The...
read moreApache: How to block all other IPs except for your own
Sometimes I have to work on WordPress sites that are too busy to display the admin interface. This can happen if there’s more traffic than the server can cope with. In such cases, we may need to tell every visitor to come back later while we carry out some maintenance. But how? Thanks to an Apache command to block all IP addresses, except for our own. We can even display a “maintenance” page while we’re hard at work behind the scenes. Let’s see how. Add the following to your .htaccess file in the web root...
read moreHow to move the sidebar to the right in TwentyFifteen
I’ve never liked themes with sidebars on the left – probably because we in the western world start reading on the left, and I’d like there to be as little clutter as possible. Or perhaps I’m used to navigation items on the right. I was looking around for solutions to move the sidebar in Automattic’s TwentyFifteen theme to the right, and several options can be found on the internet. Here are two that worked for me: Option 1: CSS Tweak Thanks to the Stack Exchange community, this CSS tweak works a treat (for...
read more