Skip to content

Instantly share code, notes, and snippets.

View ljmotta's full-sized avatar

Luiz João Motta ljmotta

  • Senior Software Engineer - IBM
  • São Paulo, SP - Brazil
View GitHub Profile
@ljmotta
ljmotta / another-dmn.dmn
Last active September 12, 2022 18:14
Example
<?xml version="1.0" encoding="UTF-8"?>
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="https://kiegroup.org/dmn/_3B43CC66-E86C-48E6-9B9C-99435BA2B628" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="_5BA6081A-7F44-46FF-8714-15998F72B873" name="Untitled" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_3B43CC66-E86C-48E6-9B9C-99435BA2B628">
<dmn:extensionElements/>
<dmn:inputData id="_5937E4F1-7B59-4986-B846-29200DABC01D" name="myInput">
<dmn:extensionElements/>
<dmn:variable id="_9FC6FA97-04A6-4F22-B5B2-A7C336489C5C" name="myInput" typeRef="string"/>
</dmn:inputData>
<dmn:decision id="_20608E65-1528-4D19-B7E0-9206C06FC729" name="myDecision">
<dmn:extensionElements/>
<dmn:variable id="_490C9F86
@ljmotta
ljmotta / erro.sh
Created December 30, 2021 18:54
errooooooooooooooooooooooooooooooooooooooooo
➜ boxed-expression-component git:(migration) ✗ yarn test
yarn run v1.18.0
$ yarn run run-script-if --bool "$(build-env global.build.test)" --then "jest --silent --verbose --passWithNoTests"
$ /home/lmotta/Documents/redhat/kogito-tooling/node_modules/.bin/run-script-if --bool true --then 'jest --silent --verbose --passWithNoTests'
[run-script-if] Boolean condition supplied.
[run-script-if] Condition is 'true'. Running _then_ command(s).
[run-script-if] Running 1 command(s): ['jest --silent --verbose --passWithNoTests']
[run-script-if] Running 'jest --silent --verbose --passWithNoTests'
FAIL tests/components/Table/EditableCell.test.tsx
● Test suite failed to run
@ljmotta
ljmotta / error.txt
Created December 21, 2021 14:57
octokit error
Module not found: Error: Can't resolve '@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types' in '/home/lmotta/Documents/redhat/kogito-tooling/packages/online-editor/src/editor'
resolve '@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types' in '/home/lmotta/Documents/redhat/kogito-tooling/packages/online-editor/src/editor'
Parsed request is a module
using description file: /home/lmotta/Documents/redhat/kogito-tooling/packages/online-editor/package.json (relative path: ./src/editor)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
looking for modules in /home/lmotta/Documents/redhat/kogito-tooling/node_modules
existing directory /home/lmotta/Documents/redhat/kogito-tooling/node_modules/@octokit/plugin-rest-endpoint-methods
using description file: /home/lmotta/Documents/redhat/kogito-tooling/node_modules/@octokit/plugin-rest-endpoint-methods/package.json (relative path: .)
@ljmotta
ljmotta / I18nWrappedExampleDictionary.ts
Last active August 2, 2021 13:01
I18n Wrapped Example Dictionary
interface MyDictionary extends ReferenceDictionary {
// ...
dragFile: Array<string | Wrapped<"file" | "folder">>;
}
const en: MyDictionary {
// ...
dragFile: ["Drag the ", wrapped("file"), "to your ", wrapped("folder")];
}
@ljmotta
ljmotta / I18nWrappedExample.tsx
Created July 30, 2021 20:46
I18nWrapped Example
<I18nWrapped
components={{
file: <Label>{FILE}</Label>,
folder: <Label>{FOLDER}</Label>,
}}
>
{i18n.dragFile}
</I18nWrapped>
@ljmotta
ljmotta / TraficViolation.dmn
Last active July 5, 2021 22:47
TraficViolation.dmn
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="https://kiegroup.org/dmn/_41B2F498-3F8D-4DBA-95B9-216E1C0209EA" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="_4195FEF6-9C31-4A5D-97EC-AFF8B8B57E38" name="new-file" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_41B2F498-3F8D-4DBA-95B9-216E1C0209EA">
<dmn:extensionElements/>
<dmn:itemDefinition id="_7FBA70D7-5A2A-4583-947F-71D4C6BD98C9" name="tDriver" isCollection="false">
<dmn:itemComponent id="_5E62C98F-9C03-49D3-909A-F87397910191" name="Points" isCollection="false">
<dmn:typeRef>number</dmn:typeRef>
</dmn:itemComponent>
<dmn:itemComponent id="_34FF7299-DF1E-4FCC-87A7-ADD428028D59" name="Age" isCollection="false">
<dmn:typeRef>number</d
@ljmotta
ljmotta / package.json
Last active June 28, 2021 19:33
Uniforms version 3.0.0 bug using `autoField` props
{
"name": "newapp",
"version": "0.1.0",
"private": true,
"dependencies": {
"@rjsf/core": "^2.4.1",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"ajv": "^7.0.3",
@ljmotta
ljmotta / sample.dmn
Created April 7, 2021 18:15
sample.dmn
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="https://kiegroup.org/dmn/_857FE424-BEDA-4772-AB8E-2F4CDDB864AB" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" id="_C6CBECEB-2BBC-4E14-80B0-17F576B2CF92" name="loan_pre_qualification" expressionLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_857FE424-BEDA-4772-AB8E-2F4CDDB864AB">
<dmn:extensionElements/>
<dmn:itemDefinition id="_D40B0106-62E8-4AC0-A39A-C6C9506194A9" name="Requested_Product" isCollection="false">
<dmn:itemComponent id="_68b4a96c-198a-4575-b29a-a2c8b0539a2c" name="Type" isCollection="false">
<dmn:typeRef>Product_Type</dmn:typeRef>
</dmn:itemComponent>
<dmn:itemComponent id="_ab1647c
@ljmotta
ljmotta / new-file.bpmn
Last active April 7, 2021 18:12
new-file.bpmn
<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:bpsim="http://www.bpsim.org/schemas/1.0" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:drools="http://www.jboss.org/drools" xmlns:xsi="xsi" id="_uDNr8Xn6EDmf4I4kwuolfQ" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0 bpsim.xsd http://www.omg.org/spec/DD/20100524/DC DC.xsd http://www.omg.org/spec/DD/20100524/DI DI.xsd " exporter="jBPM Process Modeler" exporterVersion="2.0" targetNamespace="http://www.omg.org/bpmn20">
<bpmn2:process id="new_file" drools:packageName="com.example" drools:version="1.0" drools:adHoc="false" name="new-file" isExecutable="true" processType="Public">
<bpmn2:sequenceFlow id="_C69F4924-10DF-44B9-A33B-4FC6183F4176" sourceRef="_6B2D3101-B56F-4B42-89C4-E9B3F2683247" targetRef="_205362F4-16F2
@ljmotta
ljmotta / sample2.dmn
Last active March 10, 2021 20:34
sample.dmn
<?xml version="1.0" encoding="UTF-8"?>
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" id="_C6CBECEB-2BBC-4E14-80B0-17F576B2CF92" name="loan_pre_qualification" expressionLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_857FE424-BEDA-4772-AB8E-2F4CDDB864AB"><dmn:extensionElements/><dmn:itemDefinition id="_D40B0106-62E8-4AC0-A39A-C6C9506194A9" name="Requested_Product" isCollection="false"><dmn:itemComponent id="_68b4a96c-198a-4575-b29a-a2c8b0539a2c" name="Type" isCollection="false"><dmn:typeRef>Product_Type</dmn:typeRef></dmn:itemComponent><dmn:itemComponent id="_ab1647c2-cb63-4808-8d90-36d41591a40c" name="Rate" isCollection="false"><dmn:typeRef>number</dmn:typeRef></dmn:itemComponent><dmn:itemComponent id="_152917bb-6095-4057-8613-5b08b77db235" name="Term" isCollection="false"><dmn:typeRef>number</dmn:typeRef></dmn:itemComponent><dmn:itemComponent id="_e2f0e8cd-8f5a-43d4-b263-aaa5b9ae442