Skip to content

Instantly share code, notes, and snippets.

View erikmd's full-sized avatar
🐓
🐫

Erik Martin-Dorel erikmd

🐓
🐫
View GitHub Profile
@erikmd
erikmd / events-manager+https.diff
Created November 5, 2016 22:15
Patch for HTTPS issue with events-manager/templates/forms/bookingform/login.php
--- a/events-manager/templates/forms/bookingform/login.php 2016-09-06 18:32:58.000000000 +0200
+++ b/events-manager/templates/forms/bookingform/login.php 2016-10-26 17:03:52.000000000 +0200
@@ -17,7 +17,7 @@
<?php do_action('login_form'); ?>
<input type="submit" name="wp-submit" id="em_wp-submit" value="<?php esc_html_e('Log In', 'events-manager'); ?>" tabindex="100" />
<input name="rememberme" type="checkbox" id="em_rememberme" value="forever" /> <label><?php esc_html_e( 'Remember Me','events-manager') ?></label>
- <input type="hidden" name="redirect_to" value="<?php echo esc_url($_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); ?>#em-booking" />
+ <input type="hidden" name="redirect_to" value="<?php echo esc_url(($_SERVER['HTTPS'] ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); ?>#em-booking" />
<br />
<?php
@erikmd
erikmd / fragment.pom.xml
Created October 18, 2017 22:38
Fragment of `pom.xml` file with typical plugins
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
@erikmd
erikmd / pom.xml
Last active February 5, 2018 16:24
pom.xml pour Client Jersey XML et JSON
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.ups.mdl.webx</groupId>
<artifactId>client-jersey-webx</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>client-jersey-webx</name>
@erikmd
erikmd / index.html
Last active February 18, 2018 17:24
Squelette HTML5/Bootstrap pour TP4 WebX
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<!--<link rel="stylesheet" href="css/bootstrap.min.css">-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
Require Import List.
From Bignums Require Import BigZ.
Import ListNotations.
Section prog.
Fixpoint lstore s n (v : BigZ.t_) := match n, s with
| _, nil => nil
| O, _ :: t => v :: t
| S n, h :: t => h :: lstore t n v
@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)
@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 …
@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:
@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:
(lang dune 2.0)
(context
(default (disable_dynamically_linked_foreign_archives true)))