Skip to content

Instantly share code, notes, and snippets.

View fxthomas's full-sized avatar

François-Xavier Thomas fxthomas

  • DxOMark Image Labs
  • Paris
View GitHub Profile
@fxthomas
fxthomas / pw-easylink
Last active March 22, 2024 21:19
Small tool to configure and maintain PipeWire links between sets of input/output port querie
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/script/jquery-3.4.0.min.js"></script>
<link type="text/css" rel="stylesheet" href="./script/mediaelement/mediaelementplayer.min.css" />
<script type="text/javascript" src="./script/mediaelement/mediaelement-and-player.min.js"></script>
</head>
@fxthomas
fxthomas / vmmap.py
Last active July 19, 2024 11:06
Python analysis script for /proc/<pid>/maps data under Linux
#!/usr/bin/python
# coding=utf-8
"""Tool to analyze and display the contents of /proc/<pid>/maps"""
import re
import itertools
import argparse
from dataclasses import dataclass
@fxthomas
fxthomas / adbsync
Created July 3, 2019 22:31
Android <> local directory synchronization script using rsync
#!/bin/bash
# Usage: adbsync <remote path> <local path>
# <remote path> defaults to /sdcard/DCIM
# <local path> defaults to .
REMOTE_PATH=${1:-/sdcard/DCIM}
LOCAL_PATH=${2:-.}
REMOTE_PORT=1873
LOCAL_PORT=6010
# coding: utf-8
from subprocess import Popen
import subprocess
import win32job
import win32process
import win32api
class JobPopen(Popen):
@fxthomas
fxthomas / vgmdb2mb.py
Last active November 15, 2023 19:17
VGMDB to MusicBrainz import script (requires Python 3.6)
#!/usr/bin/python
# coding=utf-8
"""Python Script for bootstrapping a MusicBrainz release using a VGMDB album.
This script uses the unofficial VGMDB.info JSON API to prefill the MusicBrainz
"Add Release" form with data from VGMDB.
It is only meant as a first step to make adding a new MB release easier; please
check for missing/erroneous data and make sure the imported release follows the
@fxthomas
fxthomas / Example.pyproj.xml
Last active December 14, 2020 09:19
Example project for custom pip build integration and setup.py menu items in Visual Studio Python Tools
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>xxxx</ProjectGuid>
<ProjectHome>.</ProjectHome>
<StartupFile>setup.py</StartupFile>
<SearchPath>lib\</SearchPath>
<WorkingDirectory>.</WorkingDirectory>
@fxthomas
fxthomas / snapper-backup.py
Created June 13, 2017 21:59
Script to backup Snapper snapshots to another Btrfs filesystem
#!/usr/bin/python
# coding=utf-8
# Base Python File (snapper-backup.py)
# Created: Fri 19 Aug 2016 09:18:51 PM CEST
# Version: 1.0
#
# This Python script was developped by François-Xavier Thomas.
# You are free to copy, adapt or modify it.
#
@fxthomas
fxthomas / gnome-inhibit
Last active July 5, 2024 02:57
Inhibit gnome screensaver for a given program
#!/bin/bash
# Note: Doesn't work anymore (at least for Gnome 3.34, possibly later; see Python script instead)
# Usage: gnome-inhibit <command-line>
# Example: gnome-inhibit mpv video.mp4
cookie=$(dbus-send \
--session \
--dest=org.freedesktop.ScreenSaver \
--type=method_call \
--print-reply=literal \
> mvn clean package install -DbuildNumber=$(git describe --tags) develop [81730fe] untracked
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Libresonic
[INFO] Libresonic REST API
[INFO] Sonos API
[INFO] Libresonic Main
[INFO]