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 / .tmux.conf
Created April 9, 2013 12:13
Tmux Configuration
set -g prefix C-b
set -g default-terminal "screen-256color"
set -g history-limit 20000
setw -g automatic-rename
setw -g mode-mouse on
set-option -g mouse-select-pane on
set-option -g bell-action any
set-option -g visual-bell off
# Relax!
@fxthomas
fxthomas / patch.diff
Created May 17, 2013 14:48
Android patch for IntelliJ projects generated by sbtidea
diff -rupN original/.idea/modules.xml modified/.idea/modules.xml
--- original/.idea/modules.xml 2013-05-17 16:27:19.000000000 +0200
+++ modified/.idea/modules.xml 2013-05-17 16:41:26.000000000 +0200
@@ -1,9 +1,7 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
- <module fileurl="file://$PROJECT_DIR$/.idea_modules/main-build.iml" filepath="$PROJECT_DIR$/.idea_modules/main-build.iml" ></module>
<module fileurl="file://$PROJECT_DIR$/.idea_modules/main.iml" filepath="$PROJECT_DIR$/.idea_modules/main.iml" ></module>
- <module fileurl="file://$PROJECT_DIR$/.idea_modules/tests.iml" filepath="$PROJECT_DIR$/.idea_modules/tests.iml" ></module>
@fxthomas
fxthomas / build.scala
Created May 28, 2013 20:52
Build.scala for https://bitbucket.org/j1m/hipain and SBT-Android 0.7-SNAPSHOT
import sbt._
import Keys._
import org.scalasbt.androidplugin.AndroidPlugin._
object General {
// Some basic configuration
val settings = Seq (
name := "HiPain",
version := "0.1",
@fxthomas
fxthomas / build.scala
Created September 8, 2013 13:01
Build.scala for libgdx-sbt-project and sbt-android 0.7 (with working tests)
import sbt._
import Keys._
import org.scalasbt.androidplugin._
import org.scalasbt.androidplugin.AndroidPlugin._
import sbtassembly.Plugin._
import AssemblyKeys._
object Settings {
lazy val scalameter = new TestFramework("org.scalameter.ScalaMeterFramework")
#!/usr/bin/python
# coding=utf-8
from gi.repository import GObject
import sys
import dbus
import smtplib
import subprocess
from datetime import datetime
from dbus.mainloop.glib import DBusGMainLoop
> 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]
@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 \
@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 / 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 / vgmdb2mb.py
Last active July 30, 2025 17:05
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