Search Icon, Magnifying Glass

Marmanold.com


Entries for #Teches

Perfect Perl Kwalitee

In the time since Date::Lectionary was added to CPAN, I’ve been working hard to get a perfect Kwalitee score and make a really solid distribution. Documentation on how to make a module are all over the place and I’ve yet to see a good, single article or post to explain how to do it. This is my attempt, I hope you find it useful.

Required Files

README

I like keeping my POD within the code of the module I’m developing and having the README file(s) automatically generated from that. Below is a simple shell script I’ve developed as part of my authoring process to generate well-formed readme files in Markdown, POD, and plaintext. Having all three formats means that GitHub and MetaCPAN both have what they need to render my README as best as possible.

Read more...

Posted: , Words: ~900, Reading Time: 4 min

My WSL Perl Development Environment

Recently I bought a little Windows tablet on sale for $60 as a device to play around with Windows 10 on and for — hopefully — testing a future UWP or PWA Windows version of LectServe. I’ll give a review of the NuVision tablet at some point in the future, but after I spent two! days getting Windows updated to the newest release, I quickly enabled the Windows subsystem for Linux and installed Debian.

Read more...

Posted: , Words: ~400, Reading Time: 2 min

Full-Text Search using Hugo & Lunr

Adding full-text search to a statically generated Hugo site is a fairly easy process. As I’ve mentioned before, I’m already using Gulp to compile and minify my site. Using that Gulp file as my starting point, adding full-text search is a simple three-part process.

To enable search, I decided to use the Lunr.js library. Lunr is simple to use and has just the right amount of features for adding some simple search capabilities to your site. To start, you’ll need to create a JSON index of your site for Lunr to use. I put this layout under _default and called it search.json.

Read more...

Posted: , Words: ~500, Reading Time: 3 min

Build, Minify, and Upload Hugo to S3

Though I’m not a huge fan of JavaScript, I include a small bit of it in this site to track page views and to generate the tag cloud on my search page. Since my project had already been polluted with JavaScript, I decided a while back to go all in and use WebPack and Gulp to bundle my JavaScript code, build my Hugo site, minify everything, and then upload the whole thing to S3.

Read more...

Posted: , Words: ~300, Reading Time: 2 min

Automate Slack Status with IFTTT

Recently I came across the need to automatically update my status in Slack. I have class Monday and Tuesday afternoons/evenings which requires me to leave work a little early. As I’m often rushed, I don’t always remember to set my status. This has, at times, left my team waiting on a response to a message I won’t see for a few hours.

Luckily, using Slack’s legacy tokens and following the guidance of Made by Munsters I was able to use IFTTT to quickly automate the updating of my Slack status.

Read more...

Posted: , Words: ~300, Reading Time: 1 min

Hugo Site on S3 and CloudFront

For a very long time I’ve hosted this site at Nearly Free Speech. I’ve been happy at Nearly Free Speech, but with the launch of LectServe and other IoT and Serverless projects of mine on the AWS stack, it made logistical and financial sense to consolidate on Amazon.

Moving my Hugo site to Amazon was a fairly simple affair. First I setup a simple S3 bucket to drop my Hugo generated files to. Nothing special there at all. Next, I setup a CloudFront distribution to handle TLS and serve the files on S3. With a simple change in my domain’s DNS record everything worked perfectly. Perfectly except that all my URLs had to end in index.html to work…

Read more...

Posted: , Words: ~300, Reading Time: 2 min