Skip to content

Instantly share code, notes, and snippets.

View eniocarboni's full-sized avatar

Enio Carboni eniocarboni

View GitHub Profile
@eniocarboni
eniocarboni / OJS_Import_Test_date_published.xml
Created March 31, 2022 16:08
OJS Import Test date published
<?xml version="1.0" encoding="UTF-8"?>
<issues xmlns="http://pkp.sfu.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
<issue xmlns="http://pkp.sfu.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" published="1" current="0" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
<issue_identification>
<volume><![CDATA[21]]></volume>
<year><![CDATA[1964]]></year>
</issue_identification>
<date_published>1969-01-01</date_published>
<last_modified>1969-01-01</last_modified>
<sections>
@eniocarboni
eniocarboni / fatturapa_v1.1.xsl
Created December 7, 2021 17:57
XSL fatturapa versione 1.1
<?xml version="1.0"?>
<xsl:stylesheet
version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:a="http://www.fatturapa.gov.it/sdi/fatturapa/v1.1">
<xsl:output method="html" />
<xsl:template name="FormatDate">
<xsl:param name="DateTime" />
@eniocarboni
eniocarboni / 10-node_configuration.sh
Last active March 22, 2022 07:30
Linux-cluster-test-minimal-ubuntu1804
hacluster_pwd="$1"
hafence_pwd="$2"
HOSTNAME=$(hostname)
HOSTID=$(echo $HOSTNAME | sed 's/.*-//')
eths=$(ip address | grep '^[0-9]' | awk '{print $2}' | uniq | grep -v lo | sed 's/://g' | sed 's/@.*$//')
eth1=$(echo $eths | awk '{print $1}')
eth2=$(echo $eths | awk '{print $2}')
eth3=$(echo $eths | awk '{print $3}')
@eniocarboni
eniocarboni / 10-node_configuration.sh
Created June 16, 2020 17:07
Linux-cluster-test-minimal-centos7
# Input params:
hacluster_pwd="$1"
hafence_pwd="$2"
HOSTNAME=$(hostname)
HOSTID=$(echo $HOSTNAME | sed 's/.*-//')
eths=$(ip address | grep '^[0-9]' | awk '{print $2}' | uniq | grep -v lo | sed 's/://g' | sed 's/@.*$//')
eth1=$(echo $eths | awk '{print $1}')
eth2=$(echo $eths | awk '{print $2}')
eth3=$(echo $eths | awk '{print $3}')
# Show message box popup.
Add-Type -AssemblyName System.Windows.Forms
$result = [System.Windows.Forms.MessageBox]::Show("My message", "Window Title", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::None)
# Show input box popup.
Add-Type -AssemblyName Microsoft.VisualBasic
$inputText = [Microsoft.VisualBasic.Interaction]::InputBox("Enter some value:", "Window Title", "Default value")
# Show an Open File Dialog and return the file selected by the user.
function Read-OpenFileDialog([string]$InitialDirectory, [switch]$AllowMultiSelect)
@eniocarboni
eniocarboni / smtp_test_send_email.pl
Created August 31, 2018 16:31
Simple local test on smtp protocol with Net:SMTP (send test email)
#! /usr/bin/perl
use Net::SMTP;
use utf8;
# === Start of variables to modify ===
$from='<YOUR_FROM@YOUR_FROM_DOMAIN>';
$to ='<YOUR_RECIPIENT@YOUR_RECIPIENT_DOMAIN>';
$subject='test message with Net::SMTP';
$data='Test msg row 1
@eniocarboni
eniocarboni / smtp_test.pl
Created August 31, 2018 12:08
Simple local test on smtp protocol with Net:SMTP
#! /usr/bin/perl
use Net::SMTP;
$smtp=Net::SMTP->new(Host=>'localhost', Debug=>1);
die "Unable to connect\n" unless $smtp;
print $smtp->banner();
$smtp->quit;
@eniocarboni
eniocarboni / datacite-test.pl
Last active June 23, 2017 07:59
test datacite metadata and coin
#! /usr/bin/perl
use LWP;
use Crypt::SSLeay;
use utf8;
binmode(STDOUT,'utf8');
$user_name="<YOUR_USER>";
$user_pw="<YOUR_PASSW>";
$url="https://mds.test.datacite.org/";
$doi="10.5072/TEST/T2/89";