Skip to content

Instantly share code, notes, and snippets.

View bhdicaire's full-sized avatar

Benoît H. Dicaire bhdicaire

View GitHub Profile
@bhdicaire
bhdicaire / genericEmails.md
Created April 25, 2024 19:59
Generic, reserved or well known email adresses for common services, roles and functions 📨

I recommend using a distribution list instead of an alias to ensure that you don't have a single point of failure 🤷

Aliases allow you to have multiple email addresses that point to a single mailbox. A distribution list sends to multiple email addresses when you email a single email address.

The usual suspects are identified in the following documents: RFC 822 & RFC 2142.

Implementation gotchas:

  • GMail: Reserved aliases for spam and abuse policy in Gmail and Google Workspace
  • Azure Active Directory: Highly privileged email aliases that can only be created by an Azure AD global administrator

Essential

Fresh start for a git repository

The commit history doesn’t make sense, and disk space is ridiculous for a project with a lot of moving parts. It’s time to start over and enforce commit message that reflect the underlying change in a short, precise manner.

It's time to nuke everything except current code.

Easy way

cd git-repository
@bhdicaire
bhdicaire / script-template.sh
Created August 2, 2021 19:13 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@bhdicaire
bhdicaire / README.md
Created June 18, 2019 01:42 — forked from roachhd/README.md
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

@bhdicaire
bhdicaire / _hover_example.py
Created July 19, 2018 21:59 — forked from dankrause/_hover_example.py
Example code to use the (unofficial, unsupported, undocumented) hover.com DNS API.
import requests
class HoverException(Exception):
pass
class HoverAPI(object):
def __init__(self, username, password):
params = {"username": username, "password": password}
r = requests.post("https://www.hover.com/api/login", params=params)
@bhdicaire
bhdicaire / gitCommit+ReleaseNotes.md
Created June 30, 2018 15:02
Recommended emoji for GIT commits and release notes

Recommended emoji for GIT commit and release note

Everyone loves neat, transparent, informative commit and release notes. Everyone would also rather avoid searching forthe emoji used last time :)

The motivation for the GIST was the need to standardize all most of my commits and release notes in a project.

Recommended emojis

Commit type Emoji
@bhdicaire
bhdicaire / export-toby.js
Created March 14, 2018 23:24 — forked from krishpop/export-toby.js
Export Toby
chrome.storage.local.get("state", o => (
((f, t) => {
let e = document.createElement("a");
e.setAttribute("href", `data:text/plain;charset=utf-8,${encodeURIComponent(t)}`);
e.setAttribute("download", f);
e.click();
})(`TobyBackup${Date.now()}.json`, o.state)
));

Source: Bear - FAQ and support #@References/Bear 2018-03-09

Editor

Text Styles

⌥⌘1, ⌥⌘2, …, ⌥⌘6 Headings

⌥⌘S Line separator

@bhdicaire
bhdicaire / BearTagIcons.md
Last active May 17, 2018 23:27
Tag Icons in Bear

Bear is a beautiful, flexible writing app for crafting notes and prose. Once you get a decent tag collection going, it can get harder to find the right one in your Sidebar.

This is my current list of small icons, refer to the blog post for more information:

  • academy - school
  • android
  • animals - animal
  • anime - comics
  • app - app
  • apple
  • apple watch
@bhdicaire
bhdicaire / whoIsOnFirst.md
Created September 24, 2017 22:36
Who's on First — Abbott & Costello's classic routine

Who's on First — Abbott & Costello's classic routine

Introduction

Abbott: Well, Costello, I'm going to New York with you. Bucky Harris the Yankee's manager gave me a job as coach for as long as you're on the team.

Costello: Look Abbott, if you're the coach, you must know all the players.

Abbott: I certainly do.