Skip to content

Instantly share code, notes, and snippets.

View jnadaud's full-sized avatar

Jérôme Nadaud jnadaud

View GitHub Profile
@jnadaud
jnadaud / 1-setup.md
Created September 27, 2022 16:49 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS

Methods of Signing with a GPG Key on MacOS

Last updated September 21, 2022

This Gist explains how to do this using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

There has been a number of comments on this gist regarding some issues around the pinentry-program and M1 Macs. I've finally gotten a chance to try things out on an M1 and I've updated the documentation in 2-using-gpg.md to reflect my findings.

@jnadaud
jnadaud / dnsmasq OS X.md
Created September 3, 2022 08:30 — forked from ogrrd/dnsmasq OS X.md
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

# Given
Given I am on [the] homepage
Given I am on "url"
# When
When I go to [the] homepage
When I go to "url"
When I reload the page

Keybase proof

I hereby claim:

  • I am jnadaud on github.
  • I am jnadaud (https://keybase.io/jnadaud) on keybase.
  • I have a public key ASAmPf2UIcIjX8hQ0OftWTgSn64h9s0j_64avM61T3a04Ao

To claim this, I am signing this object:

@jnadaud
jnadaud / gist:e4b4cfd29b4c171e1c9cf657bb86e22b
Created January 14, 2017 18:52 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: sphp [phpversion]"
exit 1
fi
currentversion="`php -r \"echo str_replace('.', '', substr(phpversion(), 0, 3));\"`"
newversion="$1"