Skip to content

Instantly share code, notes, and snippets.

View darong-khalibre's full-sized avatar

Darong Mean darong-khalibre

View GitHub Profile
@darong-khalibre
darong-khalibre / reusableExceptions.md
Created February 23, 2017 05:47 — forked from 7yl4r/reusableExceptions.md
info on Java built-in exceptions from perspective of developer looking to reuse built-in exceptions

organized by estimated utility

IllegalArgumentException

Thrown to indicate that a method has been passed an illegal or inappropriate argument.

IndexOutOfBoundsException

Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.

ArithmeticException

Thrown when the requested mathematical operation is non-sensical or impossible.

@darong-khalibre
darong-khalibre / 0.Liferay Javascript API Document.md
Last active May 7, 2020 09:25
Liferay Javascript API usage and examples

#TOC

  • Invoking Liferay Services - Liferay.Service
@darong-khalibre
darong-khalibre / freemarker_variables_wcm
Created April 6, 2016 03:30 — forked from bmvakili/freemarker_variables_wcm
liferay 6.2 GA2 web content template freemarker variables available
scopeGroupId
expandoRowLocalService
reserved-article-id
unicodeLanguageUtil
serviceLocator
reserved-article-author-email-address
userGroupPermission
userPermission
staticFieldGetter
Images
@darong-khalibre
darong-khalibre / README.md
Created February 17, 2016 04:37 — forked from tknerr/README.md
Vagrant with Ansible Provisioner on Windows

Vagrant with Ansible Provisioner on Windows

Long story short, ansible does not work on a Windows control machine, so you basically have to:

  • either run ansible --connection=local ... in the target vm
  • set up a separate control vm where ansible is installed via shell provisioner

Below are Vagrantfile examples for both approaches

Within the Target VM

@darong-khalibre
darong-khalibre / git restore deleted files
Last active August 29, 2015 14:02
Restore delete files in git
# show all changes of a file, work even if the file is deleted
git log -- docroot/user_bars/logo.png
# limit the output of Git log to the last commit, i.e. the commit which delete the file
# -1 to see only the last commit
# use 2 to see the last 2 commits etc
git -1 log -- docroot/user_bars/logo.png
# view the content of the file in a specific commit; note that the file is not deleted in that commit
git show f5ac172e docroot/user_bars/logo.png
@darong-khalibre
darong-khalibre / git commit with notepad++
Last active January 2, 2016 18:59
git commit with notepad++
src: http://stackoverflow.com/questions/10564/how-can-i-set-up-an-editor-to-work-with-git-on-windows/1431003#1431003
git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
or
git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
git config --global merge.tool p4merge
git config --global mergetool.p4merge.cmd 'p4merge.exe \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"'
git config --global diff.tool p4merge
git config --global difftool.p4merge.cmd 'p4merge.exe \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"'