Skip to content

Instantly share code, notes, and snippets.

View ryanschuhler's full-sized avatar

Ryan Schuhler ryanschuhler

View GitHub Profile
#!/bin/bash
curl --fail --silent https://releases.liferay.com/releases.json > releases.json || { echo "curl failed"; exit 1; }
jq --raw-output '.[] | .productGroupVersion' releases.json > majorVersions.txt
jq --raw-output '.[] | .targetPlatformVersion' releases.json > minorVersions.txt
sort --field-separator=. --output=majorVersions.txt --reverse --unique --version-sort majorVersions.txt
sort --field-separator=. --output=minorVersions.txt --reverse --unique --version-sort minorVersions.txt
#!/bin/bash
API_KEY=""
API_SECRET=""
FILE_NAME="user_data"
LIFERAY_URL=""
PAGE_SIZE=1000
get_auth_token() {
local token_response=$(curl -s -X POST \

configuration.json

{
	"fieldSets": [
		{
			"fields": [
				{
					"dataType": "string",
					"defaultValue": "",
					"label": "Action URL",
services:
database:
command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci --character-set-filesystem=utf8 --max_allowed_packet=32M
container_name: database
deploy:
resources:
limits:
memory: 1G
reservations:
memory: 1G
version: '3.3'
services:
database:
image: "mysql:5.7"
container_name: db
environment:
- MYSQL_DATABASE=lportal
- MYSQL_PASSWORD=passw0rd
- MYSQL_ROOT_PASSWORD=passw0rd
- MYSQL_USER=user
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
<form accept-charset="UTF-8" method="post" action="%%form-action-url%%" class="form" id="pardot-form">
%%form-opening-general-content%%
%%form-if-thank-you%%
%%form-javascript-focus%%
%%form-thank-you-content%%
%%form-thank-you-code%%
%%form-end-if-thank-you%%
%%form-if-display-form%%
{
"fieldSets": [{
"fields": [
{
"dataType": "string",
"defaultValue": "custom",
"description": "src",
"label": "src",
"name": "src",
"type": "select",
[#assign src = ""]
[#if configuration.src == "custom"]
[#if configuration.customSrc?starts_with("{")]
[#assign customSrcJson = jsonFactoryUtil.createJSONObject(configuration.customSrc)]
[#if customSrcJson[locale]?has_content]
[#assign src = customSrcJson[locale]]
[#elseif customSrcJson["default"]?has_content]
[#assign src = customSrcJson["default"]]