Skip to content

Instantly share code, notes, and snippets.

View wmfairuz's full-sized avatar

Fairuz Wan Ismail wmfairuz

  • TrizIT Lab Sdn Bhd
  • Malaysia
View GitHub Profile
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\monokai]
"Colour21"="255,255,255"
"Colour20"="245,222,179"
"Colour19"="200,240,240"
"Colour18"="0,217,217"
"Colour17"="179,146,239"
"Colour16"="174,129,255"
"Colour15"="122,204,218"
@wmfairuz
wmfairuz / git-alias
Created December 4, 2013 03:40 — forked from igal/gist:53855
git aliases
# Aliases for common git commands. E.g., enter "git d" for "git diff"
# These settings live in the ~/.gitconfig file.
[alias]
b = branch
ba = branch -a
ci = commit
co = checkout
d = diff
dc = diff --cached
@wmfairuz
wmfairuz / README.md
Created December 29, 2013 11:33 — forked from dergachev/README.md

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

@wmfairuz
wmfairuz / ofbiz-custom-message.java
Created April 4, 2014 08:30
Ofbiz: java and mini lang custom messages
result = ServiceUtil.returnError( message );
result = ServiceUtil.returnError( messageList );
result = ServiceUtil.returnSuccess( message );
result = ServiceUtil.returnSuccess( messageList );
@wmfairuz
wmfairuz / ofbiz-crud.xml
Created April 4, 2014 08:49
Create new row in table
<make-value value-field="newEntity" entity-name="WorkEffortContactMech"/>
<set field="newEntity.workEffortId" from-field="parameters.workEffortId"/>
<set field="newEntity.contactMechId" from-field="parameters.contactMechId"/>
<now-timestamp field="nowTimestamp"/>
<set field="newEntity.fromDate" from-field="nowTimestamp"/>
<create-value value-field="newEntity"/>
@wmfairuz
wmfairuz / cypher-neo4j
Created April 4, 2014 09:08
Some Neo4j examples
START downstream = node:classes(name = "MDF")
MATCH downstream<-[:INSTANCE_OF]-instance
RETURN distinct instance SKIP 0 LIMIT 20
START n = node:classes(name = "MDF")
MATCH n<-[:INSTANCE_OF]-instance
WHERE instance.name =~ ".*AL.*"
RETURN distinct instance
SKIP 0 LIMIT 20
@wmfairuz
wmfairuz / split-project.sh
Created April 4, 2014 09:20
Create a new project from a subfolder of another project
cd super-project
git subtree split --prefix=sub-folder --branch=sub-folder-only
mkdir new-sub-folder
pushd new-sub-folder
git init
git remote add origin [email protected]:my-user/new-project.git
git pull ../ sub-folder-only
popd
@wmfairuz
wmfairuz / git-rm-deleted-files.sh
Created April 4, 2014 09:21
Find all deleted tracked files and git rm them
git ls-files --deleted -z | xargs -0 git rm
Generate properties file
java -jar myinstaller.jar -options-template myinstaller.properties
Install using properties file
java -jar myinstaller.jar -options myinstaller.properties
@wmfairuz
wmfairuz / commit-msg.sh
Created April 4, 2014 09:32
Get commit-msg hook
scp -p -P 29418 review.example.com:hooks/commit-msg .git/hooks/