Skip to content

Instantly share code, notes, and snippets.

@fsantini
fsantini / make_selx_mac.sh
Created October 31, 2024 14:44
SimpleElastix Python Build Mac
#!/bin/bash
PYTHON_VER=$1
if [ "$PYTHON_VER" = "" ]
then
echo "Please specify python version"
exit -1
fi
@fsantini
fsantini / pamac_upgrade_aur
Created May 31, 2024 20:43
Script to upgrade AUR packages in Manjaro. Doesn't abort everything if one package fails.
#!/bin/bash
# Initialize arrays to keep track of successful and failed builds
successful_builds=()
failed_builds=()
# Get a list of AUR packages that need to be updated
echo "Checking for AUR package updates..."
aur_updates=$(pamac checkupdates -a | grep AUR | awk '{print $1, $2}')
// ==UserScript==
// @name Youtube workaround
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Work around the youtube adblock limitation
// @author You
// @match http*://*.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @require https://code.jquery.com/jquery-3.7.1.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 29 15:01:38 2022
@author: Francesco Santini
"""
current_frame = 0;
@fsantini
fsantini / Readme_unofficial.md
Last active April 2, 2025 12:43
Script to generate SimpleElastix wheels for pip under linux, using the official manylinux image
// ==UserScript==
// @name ISMRM To Calendar
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Add calendar download links to sessions. Currently for ISMRM 2024. For other ISMRMs, the time zone needs to be adjusted!!
// @author Francesco Santini <[email protected]>
// @match https://submissions.mirasmart.com/ISMRM2024/Itinerary/ConferenceMatrixEventDetail.aspx*
// @icon https://www.google.com/s2/favicons?sz=64&domain=mirasmart.com
// @icon https://www.google.com/s2/favicons?domain=pathable.com
// @require http://code.jquery.com/jquery-3.4.1.min.js
@fsantini
fsantini / ismrm-pathable.user.js
Last active June 17, 2024 20:14
A Tampermonkey script to optimize the website experience of ISMRM21 virtual conference
// ==UserScript==
// @name ISMRM-Pathable
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Script to optimize the ismrm21/pathable
// @author Francesco Santini
// @match https://ismrm-smrt21.us3.pathable.com/*
// @match *://cdn.filestackcontent.com/*
// @icon https://www.google.com/s2/favicons?domain=pathable.com
// @require http://code.jquery.com/jquery-3.4.1.min.js
@fsantini
fsantini / GenericInputDialog.py
Last active March 23, 2023 03:42
An implementation for a generic input dialog in PyQt5. String and/or numeric values can be obtained with just one line of code. See the "Testing" section at the end of the file.
"""
Generic input dialog in PyQt5.
By Francesco Santini <[email protected]>
Code released in the Public Domain (CC-0)
"""
from __future__ import annotations
from typing import Any, Union
from collections import OrderedDict
@fsantini
fsantini / FBSavePic.js
Created February 26, 2020 16:05
Tampermonkey script to save the open Facebook image with a Ctrl-Alt-S shortcut
// ==UserScript==
// @name FBSavePic
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Save the open Facebook image with a Ctrl-Alt-S shortcut
// @author You
// @match https://www.facebook.com/*
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @grant GM_download
// ==/UserScript==
@fsantini
fsantini / gzafferanopopup.user.js
Created February 22, 2019 10:40
userscript for removing the popup from Giallozafferano website
// ==UserScript==
// @name Giallozafferano Popup closer
// @version 1
// @grant GM_addStyle
// @include https://ricette.giallozafferano.it/*
// @include http://ricette.giallozafferano.it/*
// ==/UserScript==
// Note: disable cookie storage for giallozafferano to remove the 5-page limit!