mikegriffin.ie2024-02-21T22:16:12+00:00https://mikegriffin.ie/Mike Griffiniam@mikegriffin.ieClonakilty Marathon Race Report 🥉2023-12-02T00:00:00+00:00https://mikegriffin.ie/blog/clonakilty-race-report<p>Four weeks ago i was meant to be running in the Dublin marathon but because I fell and got stitches, I wasn’t able to run.
I had most of two weeks off running before I could get back into it.
This gave me loads of time to find and enter a new race.</p>
<p>The course for clonakilty changed in the last few weeks before it, back to the original route in clonakilty itself.
This was a hillier course than the one advertised in courtmacsherry so I was a bit worried about my goal time.</p>
<p>We took the girls out of school early and headed on the long journey to cork.
We eventually made it down and got checked in to the hotel right beside the start.
I went and picked up my race number and then headed for dinner.</p>
<p>The Friday was Late Late Toy Show night and we all settled in for treats, toys and entertainment.
I laid out all my gear for the next day to make sure I wouldn’t wake anyone too early.</p>
<p>I had a decent sleep and woke up for some breakfast.
I only woke people up when I boiled the kettle for coffee.
About an hour before the start, I headed out to warm up.
It was much warmer than I expected and I decided to race in a singlet alone.
I also had a sock change and somehow found a hair clip in my shoe.
Glad I found that before I started!</p>
<p>The 10k, half marathon and full marathon started off together which made it hard to get the right pace for the first few kilometres.
After a bit of mental maths, I figured I was in the right sort of pace and then got talking to another runner.</p>
<p>“Are you doing the full?”
“Yup, you?”
“Yeah, what time are you going for?”
“2:50”
“Me too!”
“I’m Mike”
“So am I!”</p>
<p>So there we were chatting away and telling each other to rein it in a little.
The first hill was near Inchydoney.
Then we had a steep downhill and a short climb back out.
It was about here that I felt a bit tired.
I looked at my watch and sure enough I was 8km in and it was time for a gel.
Very quickly I felt better.</p>
<p>We were gaining on a runner in front of us at this stage but we didn’t want to rush up on him.
Plenty of time to catch him.
We joined back with the 10kers around here and dodged and weaved our way between them.
We caught up with the other runner and the three of us turned off onto quieter roads before another uphill section.
The other guy pushed the pace and seemed to want to drop us but we all kept in contact.</p>
<p>Another gel at the top and we had a nice downhill to recover.
Things were going really well at this stage.
We were ticking along nicely, everything felt comfortable and myself and Mike had made a little gap on the other guy.</p>
<p>Then we crossed over a junction and the stewards told us to keep going straight on.
About 100m or so past them we saw some signs that were pointing right but they were after a junction.
There were no stewards here so we kept going straight on. This turned out to be the wrong decision as we’ll see later.</p>
<p>We went on up and over a hill before a sharp left past a water station.
We asked if we were going the right way and were told we were.
So on we went, taking another gel along here.</p>
<p>We passed by a small strand and got a good cheer from Louise and the girls.
They seemed surprised to see us…</p>
<p>A couple of kilometres further on as we were coming to the bottom of the steepest climb, we were passed by a car.
The lead car.
And then the lead runner.
And another car.
What the f@*#!</p>
<p>The driver of the second car slowed down and shouted out the window, asking if we had gone wrong.
He said he’d be lodging an appeal for us at the end.</p>
<p>Just then I was totally deflated and all the energy fell out of me.
I lost contact with Mike and walked for about five steps.
I had a choice.
Give up or make the best of it.
I went with option two and decided to make up the difference at then end of the route.</p>
<p>I picked up the pace again and along with a couple of gels got moving nicely.
I was starting to meet other runners now from the other distances and got a boost every time I went past someone.</p>
<p>Coming close to the end it looked like I needed another two kilometres to make up the distance.
I went through the finish, got given a medal and went right back out again.
Oddly I passed Mike still out running!
He had decided to finish the distance <em>before</em> going across the line.</p>
<p>I finished up the full distance in 2:49:30 by my watch and walked back to the finish line.
After talking to the organiser and Mike, we came to agreement that Mike had second and I had third.
I was delighted with that and with my time.</p>
<p>In the week since the race I’ve had no pain or stiffness at all and I felt like I could go running again straight away.
I waited until the Friday before going for a light run and felt great.</p>
<p>Next up is the National Masters indoors in January, for a total change of pace.</p>
The first six weeks of marathon training2023-08-07T00:00:00+00:00https://mikegriffin.ie/blog/the-first-six-weeks-of-marathon-training<p>I started training for the 2023 Dublin Marathon six weeks ago, using the Hanson Advanced Marathon training plan.
It’s brought me back to running six days a week and my weekly mileage has more than doubled from what I was doing for the earlier part of the year.</p>
<p>There are three slow runs a week which give most of the mileage, and sticking to those paces was hard at first.
I started the program a few days before we headed off to Lanzarote for our holidays and while I was there I got most of my runs done before 8am.
It was a great feeling to be going down to breakfast knowing that you’ve already done exercise for the day.</p>
<p>I moved a few days around, changing my rest day from Wednesday to Tuesday one week and Thursday the next to accommodate my birthday and our flight home, but overall I was really pleased with how I was able to get into the routine of it all.</p>
<p>When we got back, I had a week where I was running from home before we headed off to Achill for a week.
Running in Achill was totally different than Lanzarote, not as hot and even windier.
There was even a nice dose of rain thrown into the mix.
I was able to keep going and got all my sessions done this week too.</p>
<p>Weeks five and six were done from home, and the early morning runs mostly went out the window.
I was running later and later in the day, even into the darkness one night.</p>
<p>Week six was the hardest, I gave blood on my Wednesday rest day and then had an injury scare.
While I was collecting the iPad, it somehow managed to get dropped forcefully right on the top of my foot.
It was sore at the time, but I didn’t think too much of it until it was time for bed that night.
I wasn’t able to sleep with the pain all round my foot and when I went to go and get some painkillers, I found I couldn’t put any pressure on my foot.
I was thinking the worst at this stage, possibly a fracture of some sort.
After Louise got me some painkillers, I sat feeling sorry for myself before falling off to sleep, this was it, the end of training!</p>
<p>But then I woke the next morning and there was no pain.
And no swelling ro bruising either.</p>
<p>I took that day off just as a precaution, but I was able to run on Friday where I did a seven mile marathon pace run.
To say that didn’t go well would be an understatement!
I had to stop twice and take a large rest, I was really disheartened at the end of it.
If I couldn’t even do seven miles, how could I do 26 at that pace?</p>
<p>But a couple of days later it dawned on me, giving blood is going to have a definite effect on performance for the next while, right?!</p>
<p>So I finished out the week by doing Friday and Saturday’s sessions on Saturday and Sunday instead for a slightly lower weekly mileage.</p>
<p>That’s a quick recap of the first third of my training program, overall I’m glad I’ve got something to follow.
It’s forcing me to get out and run when otherwise I’d be looking for excuses and saying I’ll run tomorrow.
The consistency of running six days is not too wearing, I think the slow runs in there are making that all possible.</p>
<p>Twelve more weeks to go and it’s going to get more interesting over the next few weeks too.
Next week, I’m breaking things up by doing some track races and then two weeks after that I’ll run around in the National Hal Marathon championships in Tullamore.
The goal for that one will be to be finishing strongly at less than marathon pace, I’m scheduled for a 15 mile long run that day.</p>
Adding dark mode2022-11-10T09:15:00+00:00https://mikegriffin.ie/blog/adding-dark-mode<p>Yesterday I did a bit of a refurb around the place, changing the look and colours a little bit.
On top of this I added <a href="https://github.com/mgriffin/mikegriffin/commit/39478c62097646f13425e2a2998c3bf564306cbf">dark mode</a> which should work automatically depending on your OS settings.</p>
<p>Because of the <a href="https://simplecss.org/">simple css</a> project that I used, it was an easy process to change the colours to something that made it a bit more personal, using <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties">CSS variables</a>.</p>
<p>I wasn’t sure how to do it using a static site, so I did my usual research on the interwebs and came across <a href="https://derekkedziora.com/blog/dark-mode-revisited">this great article by Derek Kedziora</a>.
Originally I thought that a button to allow someone to change the mode would be the way to go but it turns out that it’s even easier to allow the OS to define when dark mode or light mode should be enabled.
This is because every major browser supports the CSS media query <code class="language-plaintext highlighter-rouge">@media (prefers-color-scheme: dark)</code> which where you can define the dark mode colours for your site. 🎉</p>
<h3 id="heres-how-it-looks-now">Here’s how it looks now:</h3>
<p>Light:</p>
<p><img src="/images/2022-11-10-adding-dark-mode/light-mode.jpg" alt="cropped screenshot of this site's light theme" class="screenshot" /></p>
<p>Dark:</p>
<p><img src="/images/2022-11-10-adding-dark-mode/dark-mode.jpg" alt="cropped screenshot of this site's dark theme" class="screenshot" /></p>
Connaught Cross Country, Leg two2022-11-06T00:00:00+00:00https://mikegriffin.ie/blog/connaught-cross-country-leg-two<p>Leg two of the Connaught Cross Country took place in Drumshanbo in Co. Leitrim in a field opposite Allen Gaels GAA pitch.
The previous week had been wet and we were warned to bring wellies and long spikes for what would turn out to be a very muddy course.</p>
<p>I met Dad on the other side of Drumshanbo and we headed off to find a closer parking spot.
We got as far as the primary school and there was enough parking around the place.
I got ready and went ahead into the field, thinking I had enough time for a few warm up laps and a shake out.
I found Tom waving my number and telling me that the women’s race was already underway, they were ahead of time.</p>
<p>I popped on my spikes and took in one recce lap to get the lie of the land.
The start was in a wet corner, with a long straight before turning left to climb a steep hill.
The hill was pretty cut up but it looked like it might be okay to climb on the racing line.
In the end, I like most others headed far right to get some better ground.</p>
<p>After the top of the hill, another left turn took you down a slight incline as you meandered across and down the slope.
A last turn left brought you past the finish line and back to the start.</p>
<p>The masters race was six laps and it was run at the same time as the senior race of eight laps.</p>
<p>It was a confusing start with the marshals trying to separate the different groups.
Once we got under way, I took it easy knowing what was coming up.
On each lap, I followed Peter from Swinford, going wide along the long straight at the start to stay out of the muddy and wet stuff.
The hill was a complete killer each time, coming to it and getting slower and slower.
There was no time to recover at the top, it was straight into thick slippery mud.</p>
<p>For the last couple of laps I was going back and forth with a gut from North Leitrim, but he was doing the longer eight lap race.
On my last lap, I let go on the last part of the downhill and kept pushing on to the finish, so glad to be done!</p>
<p>I finished in 7th place and 3rd over 35.
I have to be pretty happy with that result, given the conditions and that I’d picked up a head cold two days before.</p>
Mayo Cross Country, Leg three2022-10-30T00:00:00+00:00https://mikegriffin.ie/blog/mayo-cross-country-leg-three<p>Leg three of the Mayo Cross Country League was in Swinford, a challenging hilly course spread over four fields.
This was run off with the uneven ages kids races, which meant that my oldest Éabha was able to run in the U9 race.</p>
<p>We got there as a family and parked up.
I headed off with Éabha and we started off on a bot of a warm up before seeing the field line up.
Slightly panicky, I brought Éabha over to the start and got her lined up beside her friends.
They had one lap to do, 1000m, which took in all of the hills.
I ran around cheering on the girls and was so proud to see her running so string over a tough course.
She finished it really well and was delighted to be given a medal.</p>
<p>I had some time then between that race and mine, which I took to do a couple of warm up laps.
There was a big rain shower at this stage, so Louise took the girls back to the car so they wouldn’t freeze.</p>
<p>My race came around and they ran off the Women’s, Mens O65, Junior, Senior and Masters men all at the same time, all doing different distances.
I didn’t envy the marshals trying to decipher that one!</p>
<p>The race started and four juniors raced off into the distance, I was in the next group.
By the end of the first lap, I was catching up on the guy in fourth and feeling good.
I was really enjoying the downhills, even if I almost landed on my face on one of them!</p>
<p>By lap three, I was up on the shoulder of the guy in fourth and passing him on the downhills.
He caught and passed me on the uphills, I didn’t want to push too hard on these, I was scared I’d blow up.
I had to run the last two laps on my own, and tried to keep pushing on as best I could.
I felt like I finished it strongly and was glad to get across the line as the first master runner.</p>
<p>This was a great day of running, seeing all the kids run around and enjoying things even with the lousy weather was brilliant and it was topped off seeing Éabha run her first cross country race.</p>
Fuzzy Searching Files in a Specific Directory in Vim2022-09-01T14:34:00+00:00https://mikegriffin.ie/blog/fuzzy-searching-files-in-a-specific-directory-in-vim<p>I’ve been using <a href="http://vimwiki.github.io/">vimwiki</a> for a little while to take notes as I work through the day.
One issue that I had was that I had no easy way to search through older notes without dropping out of vim and manually searching.</p>
<p>I’ve also been using <a href="https://github.com/junegunn/fzf">FZF</a> loads and really like how it works, so I wanted to make use of that too.</p>
<p>With the <a href="https://github.com/junegunn/fzf.vim">fzf.vim</a> I was almost where I wanted to get to.
I could use <code class="language-plaintext highlighter-rouge">:Ag</code> to search through files in the current directory but this sometimes meant I was in the wrong place when I started the search.</p>
<p>A bit of searching led me to <a href="https://github.com/junegunn/fzf.vim/issues/413">this GitHub issue</a> where someone asked how to scope a search to a specified directory.
I got pretty excited as this is exactly what I wanted to do!</p>
<p>After some playing around and trial and error, I eventually came up with this little snippet which I added to my <code class="language-plaintext highlighter-rouge">~/.vimrc</code></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>command! -bang -nargs=+ -complete=dir Rag call fzf#vim#ag_raw(<q-args>, {'options': '--delimiter : --nth 4..'}, <bang>0)
noremap <leader>v :Rag '^(?=.)' ~/Dropbox/vimwiki/<return>
</code></pre></div></div>
<p>The first <code class="language-plaintext highlighter-rouge">command!</code> creates a command that can be called as <code class="language-plaintext highlighter-rouge">:Rag <search-term> <directory></code> and I’ve used the second line to map that to <code class="language-plaintext highlighter-rouge"><leader>v</code>.
The strange looking <code class="language-plaintext highlighter-rouge">'^(?=.)'</code> was taken from the definition of <a href="https://github.com/junegunn/fzf.vim/blob/d3b9fed9c2415a2682cb1c8604e25a351325c22b/autoload/fzf/vim.vim#L594-L604"><code class="language-plaintext highlighter-rouge">fzf#vim#ag</code></a>.
I don’t fully understand it, but it allows a blank search string so that I don’t have to supply anything there and it brings up the full search that I can then type into.
Lastly, I’ve set the directory to search to the one where I store my vimwiki files.</p>
Saving Tmux Scrollback to a File2022-05-04T17:15:00+00:00https://mikegriffin.ie/blog/saving-tmux-scrollback-to-a-file<p>I do most of my console work using tmux so that I can get multiple windows to see different things at the same time.
Sometimes, I copy the scrollback from one pane into a file so that I can save it or work on it in some way.</p>
<p>Today, I ran into a problem with that because I had somehow created a single line with over 32,000 characters.
When I tried to paste it into vim, as I usually do, my CPU shot up to 100% and vim stopped responding.</p>
<p>I went looking for a solution and found <a href="https://unix.stackexchange.com/questions/26548/write-all-tmux-scrollback-to-a-file">this Stack Exchange post</a>.
There’s loads in there, but the bit I used straight away was <code class="language-plaintext highlighter-rouge">CTRL+A</code> and then</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>:save-buffer ~/long-string.txt
</code></pre></div></div>
<p>This wrote the text that I had copied into the buffer to a file in my home directory where I could do with it as I pleased.</p>
<p>Some of the other neat things in there are</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>:capture-pane <span class="nt">-S</span> <span class="nt">-3000</span>
</code></pre></div></div>
<p>This will get the last 3,000 lines from the pane’s history and dump them into the buffer.
There’s also <code class="language-plaintext highlighter-rouge">-E</code> to specify an end, as well as using <code class="language-plaintext highlighter-rouge">-</code> instead of specifying a number to get all the lines.</p>
<p>As the icing on the cake, here’s a binding that lets you store the pane history in a file of your choosing in one go:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>bind-key P command-prompt <span class="nt">-p</span> <span class="s1">'save history to filename:'</span> <span class="nt">-I</span> <span class="s1">'~/tmux.history'</span> <span class="s1">'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'</span>
</code></pre></div></div>
Commenting Regexes2021-09-06T11:19:00+00:00https://mikegriffin.ie/blog/commenting-regexes<p>Regexes are really useful but as the old saying goes:</p>
<blockquote>
<p>Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems.</p>
</blockquote>
<p>One of the issues that I have with them is that sometimes they can take a bit of testing to get them to work.
When you come back to them after a while, it’s like looking at hieroglyphics, with little chance of understanding them again.</p>
<p>To try and combat this, I’ve been commenting my regexes over multiple lines, like this:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$findGRpattern = "/\b". # start the search on a word boundary
"(?<![.])". # a negative lookbehind to exclude numbers with decimal places
"(". # start the capture
"[A-HJ-Z]?". # an optional capital letter that is not an I
"\d{3,5}". # 3, 4, or 5 numbers
"\s?". # an optional space
"\d{3,5}". # another 3, 4, or 5 numbers
")". # stop the capture
"[A-Z]?". # an optional capital letter
"\b/"; # finish the search at a word boundary
</code></pre></div></div>
<p>I’ve broken each section of the regex up onto its own line and added a short comment about what it is supposed to do.
I’ve found that this helps when I come back and have to debug or add something into the regex at a later stage.</p>
<p>How do you go about making your regexes future friendly?</p>
<h3 id="relevant-links">Relevant Links</h3>
<ul>
<li><a href="https://blog.codinghorror.com/regular-expressions-now-you-have-two-problems/">Regular Expressions: Now You Have Two Problems</a> from coding horror.</li>
</ul>
Getting Started with Primer CSS2021-06-04T21:20:00+00:00https://mikegriffin.ie/blog/getting-started-with-primer-css<p><a href="https://primer.style/css/">Primer CSS</a> is the framework that GitHub.com uses for its design and it has a whole bunch of well designed bits that go together.
The documentation is really good and it’s easy to find most things.</p>
<p>The one thing I struggled with was trying to get a HTML page to hang the CSS bits off. Here’s what I ended up with:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code><html lang="en">
<head>
<meta charset="utf-8">
<title>My Site</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/assets/css/primer.css">
</head>
<body>
<div class="Header">
<div class="Header-item">
<a class="Header-link f4 d-flex flex-items-center" href="/">My Site</a>
</div>
</div>
<div class="container-lg">
<div class="p-5">
<p>This is text</p>
</div>
</div>
</body>
</html>
</code></pre></div></div>
<p>It’s a fairly straightforward HTML5 layout with a <code class="language-plaintext highlighter-rouge">Header</code> at the top and a <code class="language-plaintext highlighter-rouge">container-lg</code> to hold the content in the main part.
The <a href="https://primer.style/css/objects/grid#containers">documentation on containers</a> and their sizes was hidden away at the bottom of the <code class="language-plaintext highlighter-rouge">Objects > Grid</code> section.</p>
<p>I hope this helps anyone that wants to start using Primer to style their site.</p>
Soda Bread Recipe2021-05-03T14:14:00+00:00https://mikegriffin.ie/blog/soda-bread-recipe<p>A recipe from the <a href="http://www.dunanyflour.com/index.php?option=com_content&view=article&id=63&Itemid=162">Dunany Flour website</a></p>
<p><img src="https://photos.mikegriffin.ie/p/2021/05/soda-bread.jpg" alt="close up of the soda bread" /></p>
<h3 id="to-make-1-500g-1lb-loaf-you-will-need">To make 1 500g (1lb) loaf you will need.</h3>
<h4 id="ingredients">Ingredients</h4>
<ul>
<li>275g (10oz) wholemeal flour</li>
<li>80g (3oz) strong white flour</li>
<li>1 teaspoon bread soda (bicarbonate of soda)</li>
<li>Half a teaspoon salt</li>
<li>1 teaspoon brown sugar</li>
<li>1 egg</li>
<li>280ml (Half pint) buttermilk</li>
<li>50g (2oz) mixed seeds. Optional. E.g. linseed, sunflower seeds, pumpkin seeds</li>
</ul>
<h4 id="method">Method</h4>
<p>Pre heat the oven to Gas mark 5, 375°F (190°C)
A well greased 500g (1lb) loaf tin</p>
<ol>
<li>Measure the dry ingredients into a large bowl, then beat the egg and buttermilk together and add to the dry ingredients.</li>
<li>Mix together well until you have a dropping consistency. Transfer the dough into the tin and gently level the top. Sprinkle with healthy seeds of your choice and bake in the centre of the oven for 50 minutes.</li>
<li>After a few minutes, turn out onto a wire rack to cool.</li>
<li>This loaf will keep well in a bread bin for 2 – 3 days but it’s best eaten on the day it’s made.</li>
</ol>
<hr />
<p>I’ve been making this bread for a few months now, since we bought a bag of the flour from <a href="https://www.greenearthorganics.ie">Green Earth Organics</a>.
Since we finished the bag, I’ve had to look up the recipe each time, and I’m always worried that it won’t be there when I go to look for it!</p>
<p>This loaf has been a great hit with everyone, we tend to go through most of the loaf along with some home made soup each time it’s around.</p>
<p>An to top it off, the smell reminds me of my Granny’s house where whe made two loaves every morning and brown scones as well every weekend.</p>