Skip to content

Instantly share code, notes, and snippets.

View monperrus's full-sized avatar

Martin Monperrus monperrus

View GitHub Profile
@monperrus
monperrus / notes.md
Last active February 11, 2025 20:20
notes on compiling mongodb v8 on Ubuntu 22 Jammy (Feb 2025)

git clone https://github.com/mongodb/mongo.git
cd mongo
git checkout r8.0.4

scons

@monperrus
monperrus / recollq.py
Created February 8, 2025 11:40
Recollq with JSON output
#!/usr/bin/python3
"""
Recoll Query Tool with Base64 Decoder
This script provides a command-line interface to search using Recoll and decode base64-encoded fields
in the results. It returns the results as structured JSON where alternating words are treated as
key-value pairs, with values being base64-decoded.
Features:
- Command-line interface for Recoll searches
@monperrus
monperrus / notes.md
Last active January 18, 2025 09:15
Notes on Microsoft Exchange auto-importer of meeting invitations in calendar

Notes on Microsoft Exchange auto-importer of meeting invitations in calendar

  1. It imports the email subject as meeting title (not the SUMMARY field of the invitation)
  2. It requires that the organizer email (the ORGANIZER field of the invitation) is the same as the sender email
@monperrus
monperrus / joplin_systray.py
Created January 12, 2025 07:42
python system tray to show and start joplin notes
#!/usr/bin/python3
# python system tray to show and start joplin notes
# author: Martin Monperrus
# license: public domain
# url: https://gist.github.com/monperrus/6e43a5216179662655c50b901d0d152b
import pystray
from PIL import Image
import tkinter as tk
from tkinter import simpledialog
@monperrus
monperrus / elsevier.json
Created January 11, 2025 03:25
example of elsevier output for a paper curl -H "Accept: application/json" -H "x-els-apikey: xxxxxx" "https://api.elsevier.com/content/article/pii/S0950584924002593"
{
"full-text-retrieval-response" : {
"coredata" : {
"articleNumber" : "107654",
"dc:creator" : [
{
"$" : "Qian, Zhongsheng",
"@_fa" : "true"
},
{
@monperrus
monperrus / howcome-dd-on-states.py
Created November 11, 2024 07:33
an example implementation of Howcome for Python (debugging on program states), author: Andreas Zeller
#!/usr/bin/env python
# an example implementation of Howcome for Python (debugging on program states), author: Andreas Zeller
import sys
import copy
def remove_html_markup(s):
tag = False
quote = False
out = ""
@monperrus
monperrus / report.md
Last active January 29, 2025 18:07
Software Supply Chain Report of INRIA/spoon - v11.1.1-beta-9

New report, with the updates from chains-project/dirty-waters#39

Software Supply Chain Report of INRIA/spoon - v11.1.1-beta-9

How to read the results 📖

Dirty-waters has analyzed your project dependencies and found different categories for each of them:

@monperrus
monperrus / patches.json
Created November 3, 2024 21:16
npefix output for pdfbox_2965
{
"end" : 1730668188593,
"endInit" : 1730668177201,
"executions" : [
{
"decisions" : [
{
"decisionType" : "NEW",
"epsilon" : 0,
"location" : {
@monperrus
monperrus / notes.md
Last active February 12, 2025 20:56
How to automatically show all hidden comments on Github?

Problem

Github collapses comments when there are too many.

When you open a page and Ctrl-F, you don't find what you want.

Solution

Automatically loads all comments at page start with Greasemonkey / Tampermonhey / Violentmonkey userscript:

@monperrus
monperrus / github-show-all-comments.user.js
Last active February 12, 2025 20:53
Greasemonkey / Tampermonhey / Violentmonkey userscript to automatically show all comments on Github
// ==UserScript==
// @name Github Show All Hidden Comments
// @description Load and show all comments on Github, credits https://github.com/refined-github/refined-github/issues/1892#issuecomment-1044913449
// @url https://gist.github.com/monperrus/4f3fa3ecd4fcc9c617734acb7069869c/edit
// @namespace monperrus
// @author @rentecaaron
// @license Public domain
// @grant none
// @version 1.1.0
//