Skip to content

Instantly share code, notes, and snippets.

Donato dmarrazzo

  • Red Hat
  • Roma, Italia
Block or report user

Report or block dmarrazzo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dmarrazzo /
Created Oct 14, 2015
bash regex example
for i in *; do if [[ $i =~ ^[0-9]{1,2}$ ]]; then echo $i; fi ; done
dmarrazzo /
Created Mar 16, 2016
estrae data da codice fiscale
# Open a file
fi = open("/home/donato/cf.txt", "r+")
fo = open("/home/donato/date.txt", "w+")
for cf in fi:
anno = int(cf[6:8])
mese = meseCod.index(cf[8:9]) + 1
giorno = int(cf[9:11])
dmarrazzo /
Created Jul 7, 2016
JAX-RS client get collections
Client client = ClientBuilder.newClient();
Response res ="http://localhost:8888/Rest/ok").request().get();
Simple[] entity = res.readEntity(Simple[].class);
dmarrazzo / pom.xml
Created Jul 7, 2016
jax-rs 2.0 pom
View pom.xml
<project xmlns="" xmlns:xsi=""
dmarrazzo /
Created Oct 6, 2016
Remediation - launch a dynamic service task
testVar = "remed";
org.jbpm.casemgmt.CaseMgmtService cmService = new org.jbpm.casemgmt.CaseMgmtUtil(kcontext);
java.util.Map<String, Object> workParams = new java.util.HashMap<String, Object>();
workParams.put("Message", testVar);
dmarrazzo / loose-rules.wid
Created Jul 8, 2017
Work Item Handler definition
View loose-rules.wid
import org.drools.core.process.core.datatype.impl.type.StringDataType;
import org.drools.core.process.core.datatype.impl.type.ObjectDataType;
"name" : "loose-rules",
"description" : "invoke rules from an independent rule project",
"parameters" : [
"kbaseName" : new StringDataType(),
"fact" : new ObjectDataType()
dmarrazzo / dmn pom.xml
Created Aug 17, 2017
libraries for DMN execution in Drools
View dmn pom.xml
dmarrazzo /
Last active Aug 18, 2017
drools dmn execution
KieServices kieServices = KieServices.Factory.get();
KieContainer kieContainer = kieServices.getKieClasspathContainer();
DMNRuntime dmnRuntime = kieContainer.newKieSession().getKieRuntime( DMNRuntime.class );
DMNModel dmnModel = dmnRuntime.getModel("", "driving-eligibility");
DMNContext dmnContext = dmnRuntime.newContext();
Map<String, Object> person = new HashMap<>();
person.put("name", "Donato");
person.put("age", 17);
dmarrazzo / kmodule.xml
Last active Aug 18, 2017
Knowledge Deplyment Descriptor
View kmodule.xml
<kmodule xmlns="" xmlns:xsi="">
<kbase name="kbase">
<ksession name="ksession" default="true" />
dmarrazzo /
Created Aug 25, 2017
utility class to load endpoint and wsdl URL from system props
package utils;
public class EnvInfo {
private static String MOCK = "http://mas460:8088/mockPecManagerWsPortBinding";
public static String wsdl(String name){
return System.getProperty(name+"-wsdl", endpoint(name)+"?WSDL");
public static String endpoint(String name){
You can’t perform that action at this time.