Skip to content

Instantly share code, notes, and snippets.

Avatar

Enio Carboni eniocarboni

View GitHub Profile
View OJS_Import_Test_date_published.xml
<?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 Dec 7, 2021
XSL fatturapa versione 1.1
View fatturapa_v1.1.xsl
<?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 Mar 22, 2022
Linux-cluster-test-minimal-ubuntu1804
View 10-node_configuration.sh
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 Jun 16, 2020
Linux-cluster-test-minimal-centos7
View 10-node_configuration.sh
# 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}')
View powershell-gui-dialogs.ps1
# 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 Aug 31, 2018
Simple local test on smtp protocol with Net:SMTP (send test email)
View smtp_test_send_email.pl
#! /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 Aug 31, 2018
Simple local test on smtp protocol with Net:SMTP
View smtp_test.pl
#! /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 Jun 23, 2017
test datacite metadata and coin
View datacite-test.pl
#! /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";