Skip to content

Instantly share code, notes, and snippets.

View prigaux's full-sized avatar

Pascal Rigaux prigaux

  • Université Paris 1
  • Paris, France
View GitHub Profile
# script now here: https://github.com/UnivParis1/server-scripts/blob/master/bin/compareDirsAndSymlinkSameFiles
@prigaux
prigaux / proxy-broadcast.pl
Last active March 15, 2016 20:07
deprecated, See proxy-broadcast.js for something safer
#!/usr/bin/perl -w
# Usage:
#
# - for now, this script uses JSESSIONID cookie as the stickysession parameter, it could be passed as a ENV parameter
#
# - put this file in directory (example /usr/local/esup/cgi-bin)
#
# - allow that directory to run cgi-bins:
#
We couldn’t find that file to show.
@prigaux
prigaux / monitor-live-requests.conf
Last active March 13, 2019 09:44
monitor nginx live requests (using lua) (similar to apache httpd ExtendedStatus)
We couldn’t find that file to show.
@prigaux
prigaux / cas_flow_diagram.puml
Last active July 11, 2022 12:50
CAS flow diagram with back-channel single-logout
@startuml
'NB: original version David Ohsie : https://cas-dev.jasig.narkive.com/xJuuetEU/documenting-the-cas-protocol-using-sequence-diagrams-is-this-useful
title: CAS Browser Single-Signon Sequence Diagram
actor user as U
participant "Browser" as B
participant "CAS Server" as C
participant "Protected App" as P
@prigaux
prigaux / MergeFranceConnectInLdap.pm
Created November 14, 2022 16:30
LemonLDAP-NG customplugin to MergeFranceConnectInLdap
# Use it with Combination auth module:
# if ($env->{QUERY_STRING} =~ /openidconnectcallback|&idp=FranceConnect$/) then [FranceConnect, FranceConnect and attrsLDAP] or [LDAP] else if($env->{HTTP_USER_AGENT} =~ /Firefox|Kerberos/) then [Kerberos, attrsLDAP] or [LDAP] else [LDAP]
#
# and lemonldap-ng.ini
# [Portal]
# ...
# customPlugins = Lemonldap::NG::Portal::MergeFranceConnectInLdap
# MergeFranceConnectInLdap_bindDN = cn=claExternalID,ou=admin,dc=univ-paris1,dc=fr
# MergeFranceConnectInLdap_bind_password = xxx
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>easy unique password per website</title>
<style type="text/css">
body {
font-family: Verdana, Arial, Helvetica, sans-serif, monospace;
}
</style>
/// PRI_assistance_dsiun.js
if (window.parent === window) {
console.log("PRI_assistance_dsiun.js");
window.addEventListener('load', _ => {
const elt = document.querySelector('.main_form input[name=name]')
if (elt?.value) document.title = elt.value
})
}
/// PRI_itopshib.js