Skip to content

Instantly share code, notes, and snippets.

@fsantini
fsantini / magnetic-resonance-in-medicine-webpage.csl
Created May 31, 2018 13:59
Zotero style for Magnetic Resonance in Medicine with WebPage support.
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-US">
<info>
<title>Magnetic Resonance in Medicine - Francesco Santini</title>
<id>https://csl.mendeley.com/styles/518147371/magnetic-resonance-in-medicine-webpage</id>
<link href="http://www.zotero.org/styles/magnetic-resonance-in-medicine" rel="self"/>
<link href="http://www.zotero.org/styles/council-of-science-editors" rel="template"/>
<link href="http://onlinelibrary.wiley.com/journal/10.1002/(ISSN)1522-2594/homepage/ForAuthors.html" rel="documentation"/>
<author>
<name>Andrew Priest</name>
@fsantini
fsantini / ISMRMProceedings.js
Last active February 23, 2023 15:16
Zotero translator for ISMRM Proceedings
{
"translatorID": "64f80311-85ec-4089-ae6d-665b535fb3b3",
"label": "ISMRM Proceedings",
"creator": "Francesco Santini",
"target": "https?://(index.*mirasmart.com/ISMRM[0-9]+/(PDFfiles/)?|cds.ismrm.org/protected/.*Presentations/abstracts/|cds.ismrm.org/protected/.*Proceedings/PDFfiles/)",
"minVersion": "3.0",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,
@fsantini
fsantini / deleteGroup.FCMacro
Created January 10, 2015 20:33
FreeCAD macro for deleting a group object together with its children
import Part, FreeCAD, math, PartGui, FreeCADGui
from FreeCAD import Base, Console
def delWithChildren(obj):
doc = FreeCAD.ActiveDocument
for o in obj.OutList:
delWithChildren(o)
doc.removeObject(obj.Name)
sel = FreeCADGui.Selection.getSelection() # " sel " contains the items selected
@fsantini
fsantini / download.php
Created July 19, 2013 12:31
This page can be used as a "proxy" file download page that counts the downloads of every file storing them in a MySQL/MariaDB database.
<?php
/* File download counter.
* This code is copyright of Francesco Santini <francesco.santini _at_ gmail.com> and can be used and distributed freely,
* provided that you cite the author, according to the Creative Commons 3.0 - Attribution (cc-by) license.
*
* This page can be used as a "proxy" file download page that counts the downloads of every file storing them in a MySQL/MariaDB database.
* Whenever you want to let the user download a specific file, say "files/arch.tgz", use the link download.php?path=files/arch.tgz.
* This can be made transparent to the user by using the .htaccess file (see below)
* To read the statistics, call the page with the parameters show=true and your password, like this: download.php?show=true&pass=page_password.
*