Skip to content

Instantly share code, notes, and snippets.

View glefait's full-sized avatar

Guillem Lefait glefait

View GitHub Profile
@glefait
glefait / cookiecutter-replay-to-config-file.sh
Created April 15, 2024 16:13
Turn a cookiecutter replay JSON file into a configuration YAML file, easier to commit/reuse
# Requirements
- jq: https://github.com/jqlang/jq
- yq: https://github.com/mikefarah/yq
- CookieCutter: https://github.com/cookiecutter/cookiecutter
# In the following example, the project used is cookiecutter-django.json
# First time: run cookiecutter, chose options
cookiecutter https://github.com/cookiecutter/cookiecutter-django
@glefait
glefait / extract_EAP.sh
Last active February 21, 2024 14:55 — forked from cablethief/extract_EAP.sh
A simple tshark EAP certificate extractor
#!/bin/sh
# Simple tshark WiFi EAP certificate extractor
# By dominic@sensepost.com
# Updated by :
# Michael Kruger (cablethief)
# Guillem Lefait
# All rights reserved 2018
if [ ! -x $(which tshark) ]; then
echo "tshark not installed"
@glefait
glefait / CTM-cyberattaque-OCR.txt
Created October 22, 2023 12:59
CTM-images-to-pdf
Territoriale
SE mortnique
LE PRÉSIDENT
DU CONSEIL EXÉCUTIF DE
MARTINIQUE Fort-de-France, le &8 SEP, 2023
Chère Madame, Cher Monsieur,
@glefait
glefait / translation-2023-unesco-mt-pelee-japan.md
Last active September 18, 2023 21:04
transcription Japan reaction

Thank you. From time to time, we have to be honest. You know, France is our important ally, and this is a site project. And also, nobody is living there, no logging, so it's a perfect natural environment.

I would very much like to support this, but at the same time, we do recognize that IUCN has provided some issues, and it seems that there has been no convergence of views between IUCN and the State Party concerned.

@glefait
glefait / translation-2023-unesco-mt-pelee.md
Created September 18, 2023 21:00
Réponse UICN, unesco mt pelée

I think the key point here is the question of our requirement in IUCN to respond to the operational guidelines. You'll find on page 70 of IUCN's evaluation, we note the part of paragraph 93 that makes clear that in the case of volcanoes, the magmatic series should be complete and all or most of the varieties of effusive rocks and types of eruptions should be represented.

And although I noted the comments of Belgium, I think we have the sense that, based on clear analysis, that the geosites that are in the buffer zone are important, but the OUV is defined by the inscribed property.

We have no wish to stand in the way of consensus because there is clearly enormous biodiversity values and significant geodiversity values in Martinique.

Perhaps the last comment I would just make is that we do have the process of submission of possible factual errors, which allows an exchange on these sort of matters before the committee debates them. We've seen that process

# download the file
curl https://www.data.gouv.fr/fr/datasets/r/d5f400de-ae3f-4966-8cb6-a85c70c6c24a -L -o rne-CM.csv
# create the histogram with gnuplot
cut -f5- rne-cm.csv \
| grep -P "^972" \
| fgrep '1er' \
| cut -f3 \
| cut -c 1 \
| sort | uniq -c \
@glefait
glefait / solaar_autostart.sh
Created May 12, 2020 12:22
raspian + solaar : stop annoying window
$ cat /etc/xdg/autostart/solaar.desktop
[Desktop Entry]
Name=Solaar
Comment=Logitech Unifying Receiver peripherals manager
Exec='solaar --window=hide'
Icon=solaar
StartupNotify=false
Terminal=false
Type=Application
Keywords=logitech;unifying;receiver;mouse;keyboard;
#!/bin/bash
for i in {1..1000}; do
line="$(date +'%F %T') $(ping -c 25 193.252.148.140|tail -n 2|tr '\n' '\t')";
echo $line >> ~/sfr_ping.txt;
echo $line;
done
@glefait
glefait / ladocumentationfrancaise.fr.json
Created October 22, 2019 20:33
Scan 2019-10-22 https://www.ladocumentationfrancaise.fr : stealth pupeeter - single page & no action
{
"cookie": {
"route": "cfd2bfd3459b299d8a4ed95df56eda81",
"xtvrn": "$486404$",
"__trossion": "1571692868_1800_1__aafa479d-4d93-445a-a529-5831f28b43ad%3A1571692868_1571692868_1",
"__troRUID": "aafa479d-4d93-445a-a529-5831f28b43ad",
"__troSYNC": "1"
},
"localStorage": {},
"scripts": [
@glefait
glefait / decode.js
Last active April 12, 2019 15:48
decode Google Code Competition data
var googleCodeDecode = function (e) {
return JSON.parse(atob(e.replace(/[-_]/g, function(e) { return "-" == e ? "+" : "/" }).replace(/[^A-Za-z0-9\+\/]/g, "")));
}
var googleCodeEncode = function (e) {
return btoa(JSON.stringify(e)).replace(/[+/]/g, function(e) { return "+" == e ? "-" : "_" }).replace(/[^A-Za-z0-9\+\/]/g, "")));
}
params = {"min_rank": 1, "num_consecutive_users": 100};
// url example to get the first 100 results: