Skip to content

Instantly share code, notes, and snippets.

View gubi's full-sized avatar

Alessandro Gubitosi gubi

View GitHub Profile
{
"buttons": {
"Crop_wild_relative": {
"name": "Crop Wild Relatives",
"icon": "common/media/img/uploads/cwr.svg",
"refines": {
"Crop_wild_relative_checklists": {
"name": "Crop wild relative checklists",
"options": [
"National (4)"
@gubi
gubi / README.md
Last active August 29, 2015 14:16
How to run Plex on Odroid U3 (Ubuntu OS)
<?php
/**
* ExcelTemplateParser.php
*
* This file contains the {@link ExcelTemplateParser} class.
*
* @const SYSTEM_ROOT The System root dir
* @const INCLUDE_DIR Include dir
* @const CLASSES_DIR Classes dir
* @const CONF_DIR Conf dir
@gubi
gubi / ExcelTemplateParser.php
Last active August 29, 2015 14:15
An Excel file parser fot the Ontology Wrapper
<?php
/**
* ExcelTemplateParser.php
*
* This file contains the {@link ExcelTemplateParser} class.
*
* @const SYSTEM_ROOT The System root dir
* @const INCLUDE_DIR Include dir
* @const CLASSES_DIR Classes dir
* @const CONF_DIR Conf dir
@gubi
gubi / available_font-awesome_icons.php
Last active January 7, 2024 11:58
Get all icons from a font-awesome.css file and list in json mode
<?php
/**
* Available Font Awesome icons
*
* Get all icons from a font-awesome.css file and list in json mode
*
* @author Alessandro Gubitosi <gubi.ale@iod.io>
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3
*/
@gubi
gubi / phyrtual.org.harp
Created December 30, 2014 14:24
Netexport v8.0 issue
This file has been truncated, but you can view the full file.
onInputData({
"log": {
"version": "1.1",
"creator": {
"name": "Firebug",
"version": "2.0"
},
"browser": {
"name": "Firefox",
"version": "34.0"
@gubi
gubi / Plex Movie Scanner.py
Last active February 7, 2017 15:25
Plex Movie Scanner
#
# Copyright (c) 2010 Plex Development Team. All rights reserved.
#
import re, os, os.path
import Media, VideoFiles, Stack, Utils
SeriesScanner = __import__('Plex Series Scanner')
#nice_match = '(.+) [\(\[]([1-2][0-9]{3})[\)\]]'
nice_match = '(.+) [\(\[]([1-2][0-9]{3})[[\s].+[\)\]]'
standalone_tv_regexs = [ '(.*?)( \(([0-9]+)\))? - ([0-9])+x([0-9]+)(-[0-9]+[Xx]([0-9]+))? - (.*)' ]
@gubi
gubi / get_day_age.php
Created September 2, 2014 00:15
a simple birth-day calculator
<?php
if (isset($_POST["submit"]) && trim($_POST["submit"]) !== "" && isset($_POST["birth"]) && trim($_POST["birth"]) !== "" && preg_match('/^(\d\d?)-(\d\d?)-(\d\d\d\d)$/', $_POST["birth"], $matches)){
$birth = explode("-", $_POST["birth"]);
$giorno = $birth[0];
$mese = $birth[1];
$anno = $birth[2];
$mesi = array (1=>"Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre");
$correggi_num_mese = str_replace("10", "1_", $mese);
$correggi_num_mese = str_replace("0", "", $correggi_num_mese);
<?php
/*=======================================================================================
* FORMATTED RESPONSE PARAMETERS *
*======================================================================================*/
/**
* Property type (string).
*
* This tag indicates the type of the formatted property, it indicates how the
* {@link kAPI_PARAM_RESPONSE_FRMT_DISP} is structured and whether to expect additional
@gubi
gubi / api.js
Last active August 29, 2015 14:03
PGRD definitions lists
// See http://localhost/API/?definitions=api&keep_update=true
// to get the last updated version from Milko's commit
var kAPI_REQUEST_OPERATION = "op";
var kAPI_REQUEST_LANGUAGE = "lang";
var kAPI_REQUEST_PARAMETERS = "param";
var kAPI_RESPONSE_STATUS = "status";
var kAPI_RESPONSE_PAGING = "paging";
var kAPI_RESPONSE_REQUEST = "request";
var kAPI_RESPONSE_RESULTS = "results";