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 / install_ruby_bundler_project_jekyll.md
Last active January 31, 2024 18:37
Set up Ruby, Bundler and a project-level Jekyll on macOS Catalina and up

Set up Jekyll environment on macOS

Set p Ruby, Bundler and a project-level Jekyll on macOS Catalina and up

This guide is for macOS Catalina and is based on the Jekyll on macOS doc and my experience.

1. Install dev tools

Use the XCode CLI to install dev tools. Recommended so that you can install native extensions when installing gems.

@MichaelCurrin
MichaelCurrin / README.md
Last active January 30, 2024 18:04
GitHub GraphQL - Get owned repos

Public repos owned by the current user

Get repos from the GitHub GraphQL API which are owned by the authenticated user (owner of the token).

Customize the query

Instead of OWNER, you can also change the ownerAffiliations filter in the query to be COLLABORATOR or ORGANIZATION_MEMBER. Or omit the filter.

Instead of setting privacy filter to PUBLIC, you can set to PRIVATE. Or omit the filter.

@MichaelCurrin
MichaelCurrin / install-python-3.md
Last active January 27, 2024 14:27
How to install Python 3
@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 / 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 / self-extracting-shell-scripts.md
Last active October 19, 2023 06:07
Self-extracting shell scripts

Self-extracting shell scripts

Guide to using MakeSelf tool to create self-extracting shell scripts for easy distribution

How to package your shell scripts project as a release which can be easily downloaded, extracted, and run.

This is intended to work with one or more executable scripts that use a shell shebang. This could work with other shebangs I guss, but you're probably better off using the packaging approach for that language.

This guide is written for macOS / Linux.

@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
@MichaelCurrin
MichaelCurrin / docsify-embed-gist.md
Last active May 8, 2023 14:50
Docsify - embed a gist that stays update to date
@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 February 23, 2023 12:41
Increment and create a Git tag based on whether [MAJOR] or [MINOR] appears in the current commit message

Setup

If you make the script executable and in your bin directory, you can run it from anywhere.

$ chmod +x commit_msg_tag.sh
$ sudo mv commit_msg_tag.sh /usr/local/bin/commit_msg_tag

Then run as: