Skip to content

Instantly share code, notes, and snippets.

@dnebing
dnebing / create-react-cx
Created September 17, 2024 20:06
This is a script for Macs to create new Liferay React Custom Element Client Extensions.
#!/bin/bash
# Function to display the welcome message
welcome() {
echo "Welcome to the create-react-cx script!"
echo "This script will help you create a new React app that leverages Liferay's version of React."
echo "By the time the script is finished, you will have a basic Liferay React Custom Element Client Extension."
echo
}
@dnebing
dnebing / generate-client
Created September 17, 2024 15:06
This is a full script to generate a client module after merging multiple Liferay OpenAPI Headless specs.
#!/usr/bin/env bash
# Enable strict mode
set -euo pipefail
# Declare associative arrays
declare -A file_object_map
declare -A operationId_counts
declare -A operationId_occurrences
@dnebing
dnebing / merge-apis
Created September 16, 2024 03:19
This is a script used to process all of the separate OpenAPI yaml files and can merge them into a single yaml file ready to generate a client.
#!/usr/bin/env bash
# Enable strict mode
set -euo pipefail
# Declare associative arrays
declare -A file_object_map
declare -A operationId_counts
declare -A operationId_occurrences
@dnebing
dnebing / Comment_Test_Structure.json
Created September 28, 2023 17:04
This is the JSON for the structure used with the comment custom fragment
{
"availableLanguageIds": [
"en_US"
],
"contentType": "journal",
"dataDefinitionFields": [
{
"customProperties": {
"labelAtStructureLevel": true,
"confirmationErrorMessage": {
@dnebing
dnebing / rename.sql
Created May 13, 2020 21:43
SQL For renaming Liferay tables to mixed case.
RENAME TABLE account_ TO Account_;
RENAME TABLE address TO Address;
RENAME TABLE announcementsdelivery TO AnnouncementsDelivery;
RENAME TABLE announcementsentry TO AnnouncementsEntry;
RENAME TABLE announcementsflag TO AnnouncementsFlag;
RENAME TABLE assetcategory TO AssetCategory;
RENAME TABLE assetcategoryproperty TO AssetCategoryProperty;
RENAME TABLE assetentries_assetcategories TO AssetEntries_AssetCategories;
RENAME TABLE assetentries_assettags TO AssetEntries_AssetTags;
RENAME TABLE assetentry TO AssetEntry;
04-Nov-2019 12:06:59.000 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [Framework Event Dispatcher: Equinox Container: e743df6a-d310-496b-9895-8268e33fb53f] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:502)
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:400)
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:336)
04-Nov-2019 12:06:59.001 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [Refresh Thread: Equinox Container: e743df6a-d310-496b-9895-8268e33fb53f] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.Obje
@dnebing
dnebing / rest-openapi.yaml
Created September 3, 2019 15:28
This is my OpenAPI Yaml file for the Headless Vitamins API.
components:
schemas:
Vitamin:
description: Contains all of the data for a single vitamin or mineral.
properties:
name:
description: The vitamin or mineral name.
type: string
id:
description: The vitamin or mineral internal ID.
name=UHGPortlets
module-group-id=CHPortlets
module-incremental-version=1
short-description=IHR Portlets
change-log=Adapted to the latest version of Liferay
page-url=http://ihr.uhg.com
author=UHG, Inc.
licenses=CHIHR
liferay-versions=7.1.0+
@dnebing
dnebing / chportlets.log
Created July 10, 2019 15:27
Failure to load...
2019-07-10 15:02:57.410 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][AutoDeployDir:261] Processing CHPortlets.war
2019-07-10 15:03:05.352 INFO [fileinstall-/Users/dnebinger/liferay/71ee/bundle/osgi/war][BaseAutoDeployListener:43] Copying portlets for /Users/dnebinger/liferay/71ee/bundle/tomcat-9.0.6/temp/20190710150305329VPNFBPNZ/CHPortlets.war
2019-07-10 15:03:05.473 INFO [fileinstall-/Users/dnebinger/liferay/71ee/bundle/osgi/war][BaseDeployer:877] Deploying CHPortlets.war
2019-07-10 15:03:06.527 INFO [fileinstall-/Users/dnebinger/liferay/71ee/bundle/osgi/war][BaseAutoDeployListener:50] Portlets for /Users/dnebinger/liferay/71ee/bundle/tomcat-9.0.6/temp/20190710150305329VPNFBPNZ/CHPortlets.war copied successfully
2019-07-10 15:03:08.802 ERROR [fileinstall-/Users/dnebinger/liferay/71ee/bundle/osgi/war][org_apache_felix_fileinstall:97] Error while starting bundle: webbundle:/Users/dnebinger/liferay/71ee/bundle/osgi/war/CHPortlets.war?Bundle-SymbolicName=CHPortlets&Web-ContextPath=/CHPortl
DB2 Universal Database Version 10.5, 5622-044 (c) Copyright IBM Corp. 1991, 2012
Licensed Material - Program Property of IBM
IBM DB2 Universal Database SQL and XQUERY Explain Tool
DB2 Universal Database Version 10.5, 5622-044 (c) Copyright IBM Corp. 1991, 2012
Licensed Material - Program Property of IBM
IBM DB2 Universal Database SQL and XQUERY Explain Tool
******************** DYNAMIC ***************************************