This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.liferay.portal.kernel.exception.PortalException | |
import com.liferay.portal.kernel.model.User | |
import com.liferay.portal.kernel.service.UserLocalServiceUtil | |
try { | |
// You can replace 'userId' with the actual user's ID | |
def user = UserLocalServiceUtil.getUser(44386) | |
def companyId = user.getCompanyId() | |
println "Company ID for User ${user.getScreenName()}: $companyId" | |
} catch (PortalException e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#-- dump.ftl | |
-- | |
-- Generates tree representations of data model items. | |
-- | |
-- Usage: | |
-- <#import "dump.ftl" as dumper> | |
-- | |
-- <#assign foo = something.in["your"].data[0].model /> | |
-- | |
-- <@dumper.dump foo /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Place this file in an arbitrary directory and run. | |
# brew bundle | |
# | |
# You need to install these manually. depend on the version of XCode, so these have to be installed at first. | |
# 1. XCode (use xcode-select --install command to install) | |
# 2. XCode command line tool (This is reqired for anyenv) | |
# 3. mas (brew install mas) | |
# 4. anyenv (brew install anyenv) | |
# 5. nodenv (brew install nodenv) | |
# |