Mark Grealish

> cats and wizardry


the website

I did it!

200,420 blocked spam comments!

A hot new look

I changed the site’s layout because I didn’t like the old version. Along the way I fixed a good deal of shit code and poor design decisions. Gone is any compatibility with Internet Explorer. https://github.com/bhalash/sheepie-theme Off the top of my head, I: Removed KnockoutJS in favour of a teeny jQuery pub/sub model. Removed convoluted avatar […]

I’m an idiot

So yeah, I may have had a silent permission problem with mod_pagespeed: root@caira apache2 $ {zcat error*gz & cat error.log{,.1}} | grep 'mod_pagespeed' | wc -l 4789168 root@caira apache2 $ {zcat error*gz & cat error.log{,.1}} | grep -v 'mod_pagespeed' | wc -l 7 Let’s just sweep this one under the rug…

The Archivening

A major gap in the Sheepie theme has been the absence of templates for category, tag and date archives. This update adds such. Changes: Added archive templates for categories, tags and dates. Made a pass to simplify theme CSS by removing dual output of px and rem values for rules. Only rem values are now […]

No more jQuery

Here’s a change: your Sheepie experience is now free of jQuery unless you are a dirty IE9 peasant. This morning I removed the last piece of jQuery-dependent code, a preprocessor for highlight.js. highlight.js operates on <pre> tags with a <code> child element. Since I have a few hundred older posts without code that I didn’t […]

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 […]

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 […]

SSL master race

Let the excitement…commence! I purchased SSL certificates through Namecheap.com for: https://www.bhalash.com/ https://ix.bhalash.com/ :D

Blog statistics

I have begun to add back the missing archive functionality. To accomplish this I added several functions which display information about the content, along with a wrapper function which will print it all.

I had a code review

Nothing as in depth as a line-for-line pickapart, but I asked for feedback on boards.ie. The feedback was great and has led to a huge performance boost to the site: I moved all of my media content to a local subdomain; I added a DNS prefetch directed to the media subdomain; and I changed jQuery […]

Operation Break the Site V

AKA “Who’s left to care?” While the front-end appearance of the site hasn’t changed too much since the March update, the back-end appearance certainly has. I’ve pushed about eighty commits to Sheepie in the past few days with the goal of refactoring the code and bringing it to a higher standard: I renamed the theme […]

Operation: Break the Site IV

I’ve fixed yet more crap since part III in this series: Search works now. Side-by-side flexbox layout for multiple images. Tested the site in live Internet Explorer and across multiple devices. The site is getting less bad.

Operation: Break the Site III

Between my last post and today I admittedly did piss-all with the site and left a good chunk of it in a woefully broken state. I sat down today and got a huge chunk of work done: I added a new comment layout (see here). Returned all meta content to post footers. Re-enabled comment input […]

Operation: Break the Site II

It’s going pretty well; I’ve covered most of my initial goals, and now I am taking further steps to pad out content across the site by adding a list of related posts below each article: $related_posts = new WP_Query(array( 'post_status' => 'publish', 'cat' => $category[0]->cat_ID, 'posts_per_page' => 20, 'orderby' => 'rand', 'order' => 'DESC', 'post__not_in' […]

Operation: Break the Site

The website’s appearance has bugged me badly over the past six months. I threw it together in my first fumblings with WordPress, and the sheer amount of things I have learned since on the topics of HTMl, CSS, PHP, UX and usability, Sass and JavaScript has made the site an ever-sharper embarrassment. Frankly, it looks […]

Okay, the site /should/ work now

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

So I swear a lot here

#!/bin/bash # List compiled from: # Slate: http://goo.gl/vPC4X4 # Wikipedia: http://goo.gl/mdcyT8 swear_words=( 'shit' 'fuck' 'damn' 'bitch' 'crap' 'dick' 'bitch' 'crap' 'dick' 'piss' 'pussy' 'fag' 'asshole' 'cock' 'bastard' 'darn' 'douche' 'slut' 'whore' 'christ' 'jesus' 'arse' 'bloody' 'bollocks' ) if [[ -f "$1" ]]; then echo -e "\t\nCount for swear words in $1:\n\t" printf "%-12s %s\n" "Word:" […]

Sass is fucking awesome

I rewrote most of the site’s stylesheet today, and I’ve barely even started begun! I reduced a dozen scattered rules down to: input[type=submit] { background: $color_bright_blue url('img/looking_glass.png') no-repeat center center; background-size: 65% auto; display: block; float: right; height: 100%; margin-top: -35px; position: relative; width: 35px; &:hover { background-color: $color_dark_red; } &:active { border: 1px solid […]

Learning Sass and re-designing the site

I’m moving to Sass for my CSS. I tried, but didn’t enjoy, DRY. The principles of DRY are sounds, and there are countless use cases and successful stories, but the philosophy doesn’t fit my needs. Plus, honestly, if I have to refactor my CSS and learn a new skill, I would rather learn Sass first. […]

Changing thumbnails

I don’t strip either EXIF or IPTC metadata from photographs I upload. It’s part of my “for-posterity” goal with the blog: Photo is linked to a time and place via metadata. Photo folder is linked to a blog post ID by name. Blog post should give important context for the photograph. If both parts-post and […]

Makeout Point

Thank my housemate Alanna for this theme. Alanna has wanted to blog for a while, but Alanna has also wanted to procrastinate and play video games in her free time. :) She hopes that because she asked for a unique theme for her site, and drove me to build it, she might be more likely […]

Merde

Boilerplate can be bad, and I was an idiot for using it. I used the same @font-face boilerplate code across three sites: Here, 091 Labs, and Alanna’s new Anchor site. The boilerplate is: @font-face { font-family: 'Source Code Pro Regular'; src: url('fonts/source_code_pro/scp-r.eot?') format('embedded-opentype'), url('fonts/source_code_pro/scp-r.woff') format('woff'), url('fonts/source_code_pro/scp-r.otf') format('opentype'), url('fonts/source_code_pro/scp-r.ttf') format('truetype'), url('fonts/source_code_pro/scp-r.svg') format('svg'); } Here is a […]

Operation Embiggen

I enlarged all of my site’s thumbnails to match the new default width of 600px. #!/bin/bash -x new_size="600" embiggen() { med_folder="m" if [[ ! -d "$1/$med_folder" ]]; then return 1 fi cd "$1" for img in $(find . -maxdepth 1 -iname "*.jpg" -prune); do img=$(echo "$img" | sed 's/\.\///') echo "$img" cp "$img" "$med_folder" mogrify […]

Real Men Wear Beards

“RMWB” is the new theme in use here on Self-hatred Real Men Wear Beards. As with “Funcan,” RMWB is fluid and responsive, although I went directly for a look and feel that appeals to my own aesthetics, because at the end of the day I’m the one who has to live with the appearance. It […]

Disable all emoticons from within a WordPress theme

I made my first tests of the new theme today on Peppermint, and found that WordPress nefariously inserted emoticons, because I used a test set of posts inserted from RMWB. And I hate graphical emoticons. These two lines shut down the filter from within a theme: remove_filter('the_content', 'convert_smilies'); remove_filter('the_excerpt', 'convert_smilies');

Real Men Wear Beards

Hi. I’ve been busy. After some work I undertook for Alanna last week, I had a bright flash of inspiration about a better look-and-feel for RMWB. I clutched at the coattails of the vision, and wrote it. I locked the appearance late on Thursday night, and spent Friday night in a titanic struggle with final […]

New workflows

I have been swamped this week past. There are a dozen posts in my drafts folder-backfill posts marked for update, current events and photographs. I met a wonderful and intelligent woman for lunch and hosted a second for dinner, both on Tuesday. On Wednesday I had my mum, my sister, and my sister’s children around […]

Gerunds, motha fucka

Mum frolicked naked in a fairy circle with the fey gerundbeast at midnight when she was pregnant with me. I don’t have any other explanation for my abuse of gerunds when I write. There are so many in my old posts that it has become literally Hitler. Sigh.

Operation Backfill

I added Beth as a contact on Facebook today. Marissa asked me yesterday why I hadn’t contacted her mom for photographs of Caira and Garrett, and after sending me a link to Beth’s profile, it became clear that I had been blocked by someone who had access to the account. There are literally hundreds of […]

THANKS OBAMA