Skip to content

Instantly share code, notes, and snippets.


Santiago Saavedra ssaavedra

View GitHub Profile
ssaavedra /
Last active Jul 22, 2021
DiffMatcher is a tool to check an input against a database of known variants.
DiffMatcher is a tool to check an input against a database of known variants.
For example, to determine (and resort to fuzzy-matching if required) whether
some unsanitized fields of user-input match a preset of known-good entries.
Author: Santiago Saavedra <>
SPDX-License-Identifier: CC0-1.0
ssaavedra / 57-add-emoji-support.conf
Created Jun 19, 2016
Add Emoji to Linux Fontconfig
View 57-add-emoji-support.conf
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
EmojiOne Color SVGinOT Font
Author: Santiago Saavedra <>
License: CC0
Year: 2016
View primevideospeedchanger.user.js
// ==UserScript==
// @name PrimeVideo/Netflix Speed Changer
// @namespace
// @version 1.2.3
// @description ALlows changing the playback speed on Primevideo and Netflix
// @author ssaavedra
// @homepageURL
// @downloadURL
// @updateURL
// @match*
ssaavedra / realboot.xml
Last active Apr 17, 2019
Libvirt configuration to boot from a real harddrive with VGA Passthrough on 00:07.0 + 00:07.1 with audio attached to PulseAudio of user id 1000 and support for a PS/2 mouse shared with the host (Use Ctrl_L + Ctrl_R to switch). With looking-glass IVSHM configured (17M is enough for fullhd, but round to nearest power of 2).
View realboot.xml
<domain type='kvm' xmlns:qemu=''>
<memory unit='KiB'>16588800</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static'>8</vcpu>
ssaavedra / org-clock-back.el
Last active Oct 1, 2018
Convert orgmode clocktable time to numbers
View org-clock-back.el
;; Receive time as a string like "9d 11:28"
;; Outputs the number of minutes in that
;; The regex works with and without days.
;; MIT License
(defun my-minutes-in-org-time (time)
(let ((re "\\(\\([0-9]+\\)d \\)?\\([0-9]+\\):\\([0-9]+\\)")
(values '(2 3 4)))
(catch 'exit
(if (not (string-match re time))
ssaavedra / pre-commit
Last active Sep 19, 2018
Setup a repo pre-commit hook to use scalafmt
View pre-commit
# Licensed under CC0 in jurisdictions where this is not directly in the Public Domain
# Authored by Santiago Saavedra (
git scalafmt --test || exit 1
# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --
View scalafmt-graalvm.stacktrace
Caused by: Code that was considered unreachable by closed-world analysis was
at java.lang.Throwable.<init>(
at java.lang.Error.<init>(
at scala.collection.mutable.ResizableArray.swap$(ResizableArray.scala:111)
at scala.collection.mutable.PriorityQueue$ResizableArrayAccess.p_swap(PriorityQueue.scala:66)
at scala.collection.mutable.PriorityQueue.fixUp(PriorityQueue.scala:87)
ssaavedra /
Created Jul 26, 2018
Get latest offset from a Kafka topic
get_latest_offset () { --broker-list "$KAFKA_BROKER_LIST" --topic "$1" |cut -d: -f3 | sort | head -1

Keybase proof

I hereby claim:

  • I am ssaavedra on github.
  • I am ssaavedra ( on keybase.
  • I have a public key whose fingerprint is 7346 F19D 9BB3 A08C 7532 E0E6 92CB A518 CBD9 18D9

To claim this, I am signing this object:

ssaavedra / fix-vodafone-router.user.js
Last active Mar 19, 2018
Fix Vodafone's router UI to be able to auto-fill the user/password again
View fix-vodafone-router.user.js
// ==UserScript==
// @name Fix dumb "new" Vodafone router page
// @namespace
// @include /http:\/\/(192\.168|10\.(\d{1,3})|172\.(\d+))\.(\d+).1\/login.html/
// @license
// @grant none
// ==/UserScript==
// Uses a regex so that your router can be configured on any local IP.