Skip to content

Instantly share code, notes, and snippets.

View MichaelCurrin's full-sized avatar

Michael Currin MichaelCurrin

  • The Netherlands
View GitHub Profile
@MichaelCurrin
MichaelCurrin / jekyll-new.md
Last active February 8, 2023 13:19
Set up a new Jekyll project

Set up a new Jekyll project

This short guides shows you how to setup a new skeleton Jekyll project, using the Jekyll CLI to generate the files for you.

This guide does not require Jekyll to be installed globally. Rather, it takes you through installing Jekyll in a new project that only has one file in it, then uses that project Jekyll to create all the Jekyll base files in the same directory.

Under Jekyll docs, you can see the Installation page. That provides links to install for each OS. These are covered in some detail here.

See also New under my Jekyll recipes for a few ways to set up a new Jekyll site.

@MichaelCurrin
MichaelCurrin / install-ruby-bundler.md
Last active January 4, 2024 18:30
Install Ruby 3 and Bundler

Install Ruby 3 and Bundler

Resources:

1. Install Ruby

@MichaelCurrin
MichaelCurrin / install-deno.md
Last active February 2, 2021 14:52
Install Deno
@MichaelCurrin
MichaelCurrin / README.md
Last active March 12, 2023 19:40
Render content for all Jekyll pages as a single JSON endpoint

Make a REST API with Jekyll

Render content for all your Jekyll pages as a single JSON endpoint

How it works

The JSON Liquid file below uses all pages in the site and renders their content.

The output is a map or hash. It uses the page's URL as the key. And the content as plain text (no markdown or HMTL) for the value.

@MichaelCurrin
MichaelCurrin / README.md
Last active January 13, 2021 10:09
Page performance metrics

Page performance metrics

Calculate load performance of a webpage, for any page you visit.

No libraries needed - this uses performance timings that are builtin to modern JS in the browser.

Based on Navigation Timing API doc.

Usage

@MichaelCurrin
MichaelCurrin / install-go-manually.md
Last active March 7, 2024 12:52
Install Go binary manually

Install Go binary manually

The instructions here work on Linux and macOS and use curl or wget to download Go. If you prefer to use a package manager, see this gist.

Download and install from the Go website:

  1. Find a release on Go site's Downloads page.
    • The filename will be:
      • go$VERSION.$OS-$ARCH.tar.gz
  • e.g.
@MichaelCurrin
MichaelCurrin / install-firefox-webdriver.md
Last active January 8, 2021 14:55
Install Firefox webdriver

Install Firefox webdriver

How to install Firefox's Geckdodriver so you can do webscraping with Selenium and Firefox.

macOS:

$ brew install geckodriver

Ubuntu/Debian:

@MichaelCurrin
MichaelCurrin / install-go-package-manager.md
Last active June 7, 2021 08:31
Install Go with a package manager

Install Go with a package manager

If you want a manual solution instead for more control and to get the latest release available, see this gist.

Install the Go binary.

  • Debian/Ubuntu
    • Install with apt-get to /usr/bin/go. NB. Requires root privileges.
      $ sudo apt-get update
@MichaelCurrin
MichaelCurrin / README.md
Last active October 26, 2023 18:47
Jekyll - how to build a REST API

Jekyll - how to build a REST API

Serve your data as static JSON

How to make a read-only JSON REST API using Jekyll.

This doesn't need any Ruby plugins - you just use some built-in templating features in Jekyll 3 or 4.

You will end up with a single JSON file contains data for all pages on the site, and another JSON file of just posts. Alternatively, you can replace every HTML page and post with a JSON version.

@MichaelCurrin
MichaelCurrin / july-2021.txt
Last active June 30, 2023 10:13
Netlix - my list of shows I am watching or might watch
Brooklyn Nine-Nine. Bureau of Magical Things. Disenchantment. Rita. The Politician. Trollhunters: Tales of Arcadia, all Netflix
Tiny House Nation. Cabins in the Wild.
Parks and Rec