Skip to content

Instantly share code, notes, and snippets.

View erikmd's full-sized avatar
🐓
I get many notifications; might not see your @mention: email me also if need be!

Erik Martin-Dorel erikmd

🐓
I get many notifications; might not see your @mention: email me also if need be!
View GitHub Profile
@erikmd
erikmd / Deploy using ssh and docker-compose.md
Last active March 28, 2025 03:01 — forked from jochy/Deploy using ssh and docker-compose.md
[Ubuntu] Deploy a docker-compose from Github Actions using SSH

1. Create SSH keypair

In order to deploy using SSH, we need a SSH keypair. Please use an algorithm strong enough and also supported by GHA and your remote host.

You can use the command below to generate a keypair:

ssh-keygen -t ed25519 -C gha@vm-YourLogin -f ~/.ssh/id_gha

For this use case, don't use a passphrase (just type Return to select an empty passphrase).

@erikmd
erikmd / gitconfig.md
Last active September 10, 2024 23:03
@erikmd's recommended Git configuration

Recommended Git configuration

Run these standard commands anytime you setup git on a new workstation.

Mandatory

git config --global user.name "Prénom Nom"
git config --global user.email "prenom.nom@example.com"
@erikmd
erikmd / README.md
Last active August 20, 2021 14:13
Resources for Emacs-Lisp Dev

Resources for elisp dev

How to improve emacs features discoverability & elisp debugging UX

We assume you already configured MELPA and use-package.

Otherwise, see e.g. this ~/.emacs template.

Then, add the following elisp snippet in your ~/.emacs, in order to install:

@erikmd
erikmd / README.md
Last active September 8, 2024 12:50
How to setup some GIt prompt in Bash or Zsh

Howto: Setup a Git prompt for Bash or Zsh

Disclaimer

This mini-tutorial describes a dangerous step (dowload a third-party bash script and execute/source it).

In a similar case, be always careful to:

  • only do this from trusted sources (here, from a released tag in https://github.com/git/git)
  • and inspect the script beforehand! (i.e., always avoid any blind curl … | bash command)
@erikmd
erikmd / ocaml_lwt_sample.ml
Last active April 13, 2021 20:38 — forked from mjambon/ocaml_lwt_sample.ml
OCaml/Lwt crash course. Adult supervision recommended.
(*
Interactive approach
--------------------
You can copy-paste code into `utop`, provided you load the lwt.unix
package:
#use "topfind";;
#thread;; (* only needed in the plain `ocaml` toplevel, not in `utop`. *)
#require "lwt.unix";;
@erikmd
erikmd / ANSI.md
Created February 3, 2021 22:52 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1b
  • Decimal: 27
@erikmd
erikmd / pom.xml
Last active January 14, 2025 01:44
Maven plugins template for Master SDL, Univ. Toulouse III - Paul Sabatier
<?xml version="1.0" encoding="UTF-8"?>
<!--
. _ _ _ _
/ \ | |_| |_ ___ _ __ | |_(_) ___ _ __
/ _ \| __| __/ _ \ '_ \| __| |/ _ \| '_ \
/ ___ \ |_| || __/ | | | |_| | (_) | | | |
/_/ \_\__|\__\___|_| |_|\__|_|\___/|_| |_|
Lisez bien les commentaires qui documentent ce fragment de POM.
(lang dune 2.0)
(context
(default (disable_dynamically_linked_foreign_archives true)))
@erikmd
erikmd / coq-action-2.yml
Last active January 1, 2021 12:37
A Gentle Introduction to Container-based CI for Coq projects - Figure 1.2 (.github/workflows/coq-action-2.yml)
name: CI
on:
push:
branches: ['master'] # forall push/merge in master
pull_request:
branches: ['**'] # forall submitted Pull Requests
jobs:
mathcomp:
runs-on: ubuntu-latest
strategy:
@erikmd
erikmd / coq-action-1.yml
Created June 19, 2020 11:22
A Gentle Introduction to Container-based CI for Coq projects - Figure 1.1 (.github/workflows/coq-action-1.yml)
name: CI
on:
push:
branches: ['master'] # forall push/merge in master
pull_request:
branches: ['**'] # forall submitted Pull Requests
jobs:
coq:
runs-on: ubuntu-latest
strategy: