Skip to content

Instantly share code, notes, and snippets.

@phortuin
phortuin / signing-git-commits.md
Last active July 15, 2024 08:53
Set up a GPG key for signing Git commits on MacOS (M1)

Based on this blogpost.

To sign Git commits, you need a gpg key. GPG stands for GNU Privacy Guard and is the de facto implementation of the OpenPGP message format. PGP stands for ‘Pretty Good Privacy’ and is a standard to sign and encrypt messages.

Setting up

Install with Homebrew:

$ brew install gpg
@phortuin
phortuin / mongo.md
Last active October 5, 2021 17:54
Set up mongo + database on MacOS (M1)

Based on these instructions.

Install with Homebrew:

$ brew tap mongodb/brew
$ brew install mongodb-community

Run server:

@phortuin
phortuin / postgres.md
Last active June 16, 2024 09:36
Set up postgres + database on MacOS (M1)

Based on this blogpost.

Install with Homebrew:

$ brew install postgresql@14

(The version number 14 needs to be explicitly stated. The @ mark designates a version number is specified. If you need an older version of postgres, use postgresql@13, for example.)

@phortuin
phortuin / updates.md
Last active July 15, 2021 09:51
Brew/Appstore/MacOS update
# brew packages
$ brew update && brew outdated
$ brew upgrade && brew cleanup
# casks
$ brew upgrade --cask --greedy
# doctor
$ brew doctor
# App Store
$ mas upgrade
@phortuin
phortuin / _simple-mobile-menu.md
Last active May 24, 2023 07:55
Simple mobile menu

If you don’t run any other JavaScript on your site but need a mobile menu, this will do the trick. Simple media queries make sure the menu button shows up on large screens only, and the navigation menu is hidden from small screens. By progressively enhancing the nav element with a data-menu attribute, the button toggles visibility of the menu.

HTML:
/nav.html

CSS: /styles.css

JS: /menu.js