Mark Grealish

Cats and wizardry.


2014

November


In Barna Woods

Move div between two columns in jQuery

This annoyed the hell out of me for about three hours. I was asked to write a simple JavaScript game wherein you click or tap on elements in the left column to move them to the right in the correct order, and vice versa. If I set a left-to-right handler, this would carry over when […]

Post-Dad, Year 11

I am supposed to be hard at work on a broken website, but I’m distracted by the topic of my dad, so here we all are. Tomorrow, Friday, is the tenth or eleventh anniversary of my dad’s death. I’m not sure and I don’t care to check, so let’s say eleventh. My dad was the […]

Wedding day photo restoration

I didn’t have a chance to clone it, but I like the result otherwise.

Okay, the site /should/ work now

I moved the site from a shared Blacknight account to a dedicated Linode service. More freedom, same price.

Openbox desktop in honour of my new hard disk

Generic smartphone CSS media query

@media only screen and (min-device-width: 320px) and (max-device-width: 736px) and (orientation: portrait), only screen and (min-device-width: 320px) and (max-device-width: 736px) and (orientation: landscape) { .foo { bar: norf; } } I see a great many media queries targeted for different devices-and it’s a good way of detecting the exact device viewing your site-but there doesn’t […]

New business cards!

And just in the nick of time for tomorrow’s startup event:

Auchindoun, Talador

The Temple of Karabor, Shadowmoon Valley

In WordPress, determine whether a post has any given term out of a custom taxonomy

This bugged the shit out of me yesterday, since WordPress doesn’t seem to have an equivalent to has_category() for custom taxonomies. If you don’t supply a term to check in the taxonomy, it checks all terms in the taxonomy. function has_foo_taxonomy($term = null, $post_id = null) { $taxonomy = 'foobar'; if ('' == $post_id) { […]

So this happened yesterday…

I want to believe that the robin was breaking the cycle.

Rainbow text HTML element

Eadaoin asked for this, as a dare. Not an ID identifier, not a class identifier, but a bona fide <rainbow-text> custom HTML5 element. And here we are, all pretensions of worthiness in this project cast to the wind. I used the rainbow colour chart on Wikipedia for the array. 'use strict'; var rainy = 'rainbow-text'; […]

Typewriter Permutation Simulator 2014

http://caladan.bhalash.com/typewriter/ I, for one, blame Reddit.

Well shit, it worked

Only took eight hours for my typewriter permutation simulator to work! :D