Mark Grealish

Cats and wizardry.


2015

July


Make flexbox work in older versions of Internet Explorer

Spoiler: You can’t. Sniffing for browsers to determine available design or features is considered a Bad Idea. It increases the complexity of your project. It ties you to specific browser hacks that act as a wall against future progress. It is a bad habit, plain and simple. This rule applies to all modern browsers: every […]

It isn’t a trip to Galway without Lenny

Force WordPress to load /all/ JavaScript in footer

While this was not my own fix, it is useful enough to deserve more visibility than it has now. For the sake of performance I wanted to force all WordPress JavaScript to load in the site’s footer, not in the default header. Plugin and theme developers enjoy the freedom to load all scripts wherever they […]

Hail Satan \m/

I travelled to Galway on Saturday to memorialize Michael while Eadaoin was at her family’s summer barbeque in Tipperary. My sister came up with her kids to watch the cat and house, so something something mice played. As great as it would be to have a post about Saturday, it can be condensed to optician, […]

This happened last night

Somebody, somewhere caved in. I spoke with Caira and Garrett over Facetime for about forty-five minutes. :)

Feeding time at the zoo

All of you assholes need to stop trying to break into my site

Ralph Smith (@DoMyBooks) put out a tweet this morning about attempted logins on his WordPress site. My curiosity was piqued, because last week I wrote a two-thousand word article about parsing Apache log files. I used my own log file as the template for the article, and one thing that stood out were the high […]

And now it’s there

The second post ever published on this blog was written about New Horizons on January 18, 2006, one day before the space probe launched from Florida for Pluto. And now it’s there-literally there, because New Horizons is less than fifteen minutes from Pluto periapsis as I write this post. New Horizons has been in flight […]

Colour Dash 5k, Phoenix Park 2015

x to y of z search results II

The code snippet I posted last August hasn’t worked too well: It only works for the index.php loop of all posts. All other loops (search, taxonomy, archive, etc.) have weird counts. I changed it to use the global wp_query variable to determine post count, with an addendum for private posts if I am logged in. […]

The accidental 15k walk

Whoops. Eadaoin and I went for an accidental fifteen kilometre walk on Saturday. In inappropriate gear, no less. “…wait, what?” I hear you sputter in consternation. Yes, it was dumb — I was dumb, to not grasp the length. So, in short, we decided to walk from Blackrock to Poolbeg Lighthouse by way of Strandybeach […]

I updated Social Meta

Some dude made a request for an Open Graph plugin on the /r/wordpress subreddit. I gave a pointless link to a library I knew he can’t use, because his question was lazy: https://github.com/bhalash/social-meta I realized the library can be fiddly to use when I looked back over my post, so I refactored the script as […]

^([Kk]il+|me|[no]w)$

I spent today writing a two thousand word article on regular expressions. Symbols dance around when I close my eyes. Kill me now.

Pluto, full disc

I merged: https://solarsystem.nasa.gov/multimedia/display.cfm?Category=Planets&IM_ID=20311 https://solarsystem.nasa.gov/multimedia/display.cfm?Category=Planets&IM_ID=20312 It is a Friday night and I am too drunk for any remark beyond I’ve waited too long for this.

Recursive sass asset manager

I have a stack of assets that needed a minimum-fucking-around solution to manage and load on demand, so I came up with this function: Call it with a mandatory asset and optional variants, and it returns the path to the asset wrapped in url($foo);. @function asset($asset, $variants: null) { $asset: map-get($assets, $asset); @if ($variants) { […]

Porn, porn, porn

I’m at the bottom of kind of rabbit hole where you stand knee-deep in shit and wonder how the fuck you got here. So two of my last three articles were on the subjects of the Apache log file and regular expressions. Then this morning a plagiarized article popped up on Reddit. The plagiarism was […]

Mountebank Mark

When I was at my worst I had constant manic fits. Anything at all could bring it on — a photo of the kids, a chance meeting, or spontaneous flashbash could set off an anxiety attack. It would spread out over the course of up to a week and diffuse into my daily life. The […]

More Social Meta updates

I have never used crafted excerpts any more than I use the media library, but today that became a problem. WordPress expects an excerpt when you call get_the_excerpt(). If it doesn’t, it calls wp_trim_excerpt(), which generates a dynamic excerpt from post content. wp_trim_excerpt() doesn’t accept arguments, nor can it be called outside of the main […]