Skip to content

Instantly share code, notes, and snippets.

View erikmd's full-sized avatar
🐓
🐫

Erik Martin-Dorel erikmd

🐓
🐫
View GitHub Profile
@erikmd
erikmd / recap-magit-forge.org
Created August 13, 2023 13:40
Installation and use of magit+forge in GNU Emacs

Magit/Forge and GitHub

@erikmd
erikmd / server.py
Created February 15, 2023 09:06 — forked from mdonkers/server.py
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
License: MIT License
Copyright (c) 2023 Miel Donkers
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
@erikmd
erikmd / Deploy using ssh and docker-compose.md
Last active January 29, 2024 01:34 — 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).

@jochy
jochy / Deploy using ssh and docker-compose.md
Last active April 20, 2023 08:30
[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 / 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 May 18, 2024 19:19
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 / pom.xml
Last active January 17, 2023 09:36
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.
@erikmd
erikmd / 0001-Fix-Maven-Warning.patch
Created March 3, 2020 07:53
TP3 WebX : 0001-Fix-Maven-Warning.patch
From 456da171afe812530544544101af363698cc2309 Mon Sep 17 00:00:00 2001
From: Erik Martin-Dorel <erik.martin-dorel@irit.fr>
Date: Tue, 3 Mar 2020 08:50:15 +0100
Subject: [PATCH] Fix Maven Warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
"""
[WARNING] Some problems were encountered while building the effective model for …
@Blaisorblade
Blaisorblade / int_eq.v
Last active January 28, 2020 00:33
How to prove equality of sigma types with decidable predicates
From mathcomp Require Import ssreflect ssrnat eqtype ssrbool seq tuple.
Import EqNotations.
Lemma sig_bool_eq {A : Type} {P : A -> bool} (x y: {z | P z}): sval x = sval y -> x = y.
Proof.
case: x y => [x Px] [y Py] /= Hxy; destruct Hxy.
apply eq_exist_uncurried. exists (Logic.eq_refl _).
apply bool_irrelevance.
Qed.
@erikmd
erikmd / .emacs
Last active April 3, 2023 14:21
Config Magit pour GNU Emacs
;;; Config de package.el, MELPA et use-package -*- lexical-binding: t -*-
;;; Pour plus d'infos :
;; https://github.com/magit/magit et https://magit.vc (doc officielle)
;; https://youtu.be/mtliRYQd0j4 (tuto vidéo sur git-rebase avec Magit)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Sauter si besoin cette section (ne pas avoir ce code dédoublé dans ~/.emacs)
(require 'package)