Category Archives: Tech
Keeping the year up-to-date in WordPress
Websites often have the current year in the footer with a copyright notice. If the year is manually entered it can easily get out of sync. Remembering to change it every year is easily forgotten and easy to miss. Plus, … Continue reading
Auto mapping development sites in Apache
Setting up a new virtual host entry in the Apache config files each time I setup a new development site on my local machine is a pain. Here’s how I am automatically mapping the http://*.dev hostnames to /home/user/dev/*/public in my … Continue reading
Screen width for CSS media rules
Below shows the width and device-width for the current browser, as used for CSS media rules max-width/min-width and max-device-width/min-device-width. Continue reading
Basic Subversion Commands (svn)
I don’t use Subversion very often, as I normally use Git. Here is a reminder of the basic workflow. I’m using the Implied Cookie Consent WordPress plugin repository as an example.
Using CSS :first-child / :last-child
The CSS selectors :first-child and :last-child are used to apply CSS styling to the first, or last element that is a child of the parent. For example, if you have the following list: You could give the first element a … Continue reading
Using CSS “display: table-cell” for columns
I’ve been using display: table-cell and display: table in CSS for a couple of different projects recently and have been impressed by the results. The styling is used to make elements, such as <div> tags behave like <table> and <td> … Continue reading
Static Typing vs Unit Testing
Prior to making the switch from a job as a C++ programmer to a job as a Ruby programmer, I spent some time considering the ideas around static typing and unit testing. I was reminded of this again recently when … Continue reading
Syntax & Semantics: JavaScript, Ruby & CoffeeScript
Seems like everyone is talking about how the web is moving to single page sites and much of the processing is moving to the client side. Frameworks like Ember.js and Backbone.js are what all the cool kids are talking about. … Continue reading
Vertically aligning HTML
Vertically centering HTML always seems more difficult than one would expect given how easy it is to horizontally centre text. It would follow that with vertical-align: middle; vertical alignment would be just as easy via CSS. Alas, centring vertically invariably … Continue reading
One way to do it? (Ruby vs Python)
Following on from my blog post about some of the differences I thought were important between Ruby and Python (senktec.com/2013/06/ruby-vs-python/), one of the things often cited as a difference between the two programming languages is that Python strives for one … Continue reading