This file contains 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
com.liferay.portal.kernel.cache.MultiVMPoolUtil.clear(); | |
com.liferay.portal.kernel.cache.SingleVMPoolUtil.clear(); |
This file contains 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.util.*; | |
request = PortalUtil.getOriginalServletRequest(PortalUtil.getHttpServletRequest(actionRequest)); | |
println(request.getServerName()); | |
println(request.getServerPort()); | |
println(request.isSecure()); |
This file contains 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
// | |
// original gist: ttps://gist.github.com/slemarchand/fd4f15868edeb592e64a | |
// | |
// Synchronize webapps assets (including jsp and jspf files) | |
// from maven projects sources to webapps context directories. | |
// | |
// usage example: | |
// gulp --gulpfile sync-webapps.gulpfile.js --sources . --webapps ${CATALINA_HOME}/webapps | |
// | |
// install required packages: |
This file contains 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
println(System.getProperty("java.version")) |
This file contains 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.service.*; | |
import com.liferay.portal.util.*; | |
try { | |
user = UserLocalServiceUtil.getUserByScreenName(PortalUtil.getCompany(actionRequest).getCompanyId(), "someScreenName"); | |
UserLocalServiceUtil.deleteUser(user); | |
} catch(e) { |
This file contains 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
var portletId = '15'; | |
var authToken = Liferay.authToken; | |
var url = '/en_US/group/control_panel/manage?p_auth=' + authToken + '&p_p_id=137&p_p_lifecycle=1&p_p_state=maximized&p_p_mode=view&refererPlid=565250&_137_struts_action=%2Fadmin_server%2Fedit_server'; | |
var data = '_137_formDate=1472741233467&_137_cmd=reindex&_137_tabs1=server&_137_tabs2=&_137_tabs3=&_137_redirect=&_137_portletId=' + portletId + '&_137_tabs2TabsScroll=' | |
var httpRequest = new XMLHttpRequest() | |
httpRequest.open('POST', url, true); |
This file contains 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
# | |
# http://stackoverflow.com/questions/9597410/list-all-developers-on-project-in-git | |
# | |
git shortlog -sne --all |
This file contains 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
/* Make more visible the Liferay SPA loading bar */ | |
.lfr-spa-loading-bar { | |
height: 6px; | |
background: #df4230; | |
} |
This file contains 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
this.binding.variables.each {k,v -> println "$k = $v"} |
This file contains 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
(function() { | |
COMPANY_ID = "39524"; | |
DOMAIN = "hostname"; | |
document.cookie = "COMPANY_ID=" + COMPANY_ID + "; domain=" + DOMAIN + "; path=/"; | |
document.location = "/"; | |
})(); |