↓ Skip to main content

Programming

ATG Development using 'hidden' VM

·699 words·4 mins
Brief description of my latest setup I use for CPL and LCH - in case I forget it or somebody wants to replicate it. Inspiration for the setup came from https://www.youtube.com/watch?feature=player_embedded&v=cPt_1Vga-Nk Motivation - issues with VMs # VMs are great - they allow “packaged” dev environment and quick start for the new member of the team. Start a VM on local or remote host, connect with VNC or Remote Desktop and you are in business.

Merge conflict with deleted file

·335 words·2 mins
I was merging the branch that removed / consolidated bunch of duplicate JSP files (corporate-ui-cleanup). In the meantime in master, some minor UI changes were made to these files whose content was now elsewhere. Quick trick how to resolve it fast: Show branch # CineplexB2B $ git show-branch ! [bb-database-cleanup] Loading data with XML only: no constraints and tax_id (unused field) nullable ! [bb-gradle-build] Merge branch 'master' into bb-gradle-build * [bb-master] Merged in the last 5 days changes ! [corporate-ui-cleanup] Merged in the last 5 days changes ! [master] Merged in the last 5 days changes ----- - [bb-gradle-build] Merge branch 'master' into bb-gradle-build ---- [bb-master] Merged in the last 5 days changes +*++ [bb-master^2] CPLXB2B-562, usageInfo/internalUsageInfo mapping in CFI +*++ [bb-master^2^] return order goes all the way to NEW: replaced SetPaymentGroupAmount, added ReturnFee calculator, added reusable jsp fragments for sales order pages +*++ [bb-master^2~2] Styling change to avoid disappearing links inside Terms and Conditions +*++ [bb-master^2~3] Dealing with consequences if INTERNAL split to INTERNAL_TRANSFER and INTERNAL_PURCHASE ---- [bb-master^2~4] Merge remote-tracking branch 'origin/master' into uat2-deploy ---- [bb-master^2~4^2] Merge branch 'master' of luke:cineplex-b2b +*++ [bb-master^2~4^2^] merged changes - fixed conflict +*++ [bb-master^2~4^2~2] CPLXBTOB-557 - fixed amount column to show proper currency ---- [bb-master^2~4^2~3] Merge branch 'master' of twgit@luke:cineplex-b2b.git +*++ [bb-master^2~4^2~4] CPLXBTOB-484 - fixed the spacing and comma issues +*++ [bb-master^2~5] Reverted 4d512ed - issue with recalculate. Must be solved selectively via Javascript +*++ [bb-master^2~6] Spacing in header see also version with --current

Pattern for test sourcing the script

·60 words·1 min
# Test if it is sourced or not if [[ $0 != .*bash ]]; then echo Please source it: . $0 exit 1 fi res=`gradle --version >/dev/null 2>&1; echo $? ` if [[ $res == "0" ]]; then echo Have gradle: `which gradle` gradle --version else export GRADLE_HOME=~/opt/gradle export PATH=$PATH:$GRADLE_HOME/bin echo No Gradle, adding - `which gradle` gradle --version fi

ATG Repository item linking and versioned repos

·632 words·3 mins
We have versioned repository ClientProvinceRepository that defines discount types based on account category pricelist and accounts - discountTypePriceList => (let’s not start discussion why this is not part of the pricelists). The item definition: <item-descriptor name="discountTypePriceList" display-name="Discount Type Price List" item-cache-size="1000" query-cache-size="1000" display-property="discountType"> <table name="CPLXB2B_DISCOUNT_PRICE_LIST" type="primary" id-column-name="DISCOUNT_PRICELIST_ID" > <property name="discountType" data-type="enumerated" column-name="DISCOUNT_TYPE" default="Base" queryable="true" category="Discount Price List" display-name="Discount Type" > <attribute name="useCodeForValue" value="false"/> <option value="Base" code="0"/> <option value="Silver" code="1"/> <option value="Gold" code="2"/> <option value="Platinum" code="3"/> </property> <property name="priceListId" column-name="PRICE_LIST_ID" repository="/atg/commerce/pricing/priceLists/PriceLists" item-type="priceList" display-name="List Price List" required="true" category="Discount Price List"/> <property name="salePriceListId" column-name="SALE_PRICE_LIST_ID" repository="/atg/commerce/pricing/priceLists/PriceLists" item-type="priceList" display-name="Sale Price List" category="Discount Price List"/> <property name="startDate" column-name="START_DATE" data-type="timestamp" display-name="Start Date" category="Discount Price List"/> <property name="endDate" column-name="END_DATE" data-type="timestamp" display-name="End Date" category="Discount Price List"/> </table> </item-descriptor> When I tried deployment with this, I got error

German attack

·63 words·1 min
Suddenly I started to see all apps auf Deutsch: The cause was by mistake selecting additional language in Properties -> Internationalization (Österreichisches Deutsch) and the system added it to the list as language #1. Those programs that are localized, picked it up …. Here is how that list looks like after reorder :-) I care only for the first 11 languages anyway ;-)

Dot-vimming new machine

New MacMini # MacMini:~ mediaserver$ mkdir .vim MacMini:~ mediaserver$ git clone git@github.com:radegast/dotvim.git .vim Cloning into '.vim'... The authenticity of host 'github.com (207.97.227.239)' can't be established. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts. remote: Counting objects: 367, done. remote: Compressing objects: 100% (309/309), done. remote: Total 367 (delta 58), reused 335 (delta 26) Receiving objects: 100% (367/367), 512.73 KiB, done. Resolving deltas: 100% (58/58), done. MacMini:~ mediaserver$ cd .vim MacMini:.vim mediaserver$ pwd /Users/mediaserver/.vim MacMini:.vim mediaserver$ ln -s ~/.vim/_vimrc ~/.vim .vim/ .viminfo MacMini:.vim mediaserver$ ln -s ~/.vim/_vimrc ~/.vimrc MacMini:.vim mediaserver$ ln -s ~/.vim/_gvimrc ~/.gvimrc MacMini:.vim mediaserver$ pwd /Users/mediaserver/.vim MacMini:.vim mediaserver$ git submodule init Submodule 'bundle/tlib_vim' (git://github.com/tomtom/tlib_vim.git) registered for path 'bundle/tlib_vim' Submodule 'bundle/vim-fugitive' (git://github.com/tpope/vim-fugitive.git) registered for path 'bundle/vim-fugitive' Submodule 'bundle/vim-pathogen' (git://github.com/tpope/vim-pathogen.git) registered for path 'bundle/vim-pathogen' Submodule 'bundle/vim-unimpaired' (git://github.com/tpope/vim-unimpaired.git) registered for path 'bundle/vim-unimpaired' MacMini:.vim mediaserver$ git submodule update Cloning into 'bundle/tlib_vim'... remote: Counting objects: 992, done. remote: Compressing objects: 100% (372/372), done. remote: Total 992 (delta 594), reused 946 (delta 549) Receiving objects: 100% (992/992), 210.90 KiB, done. Resolving deltas: 100% (594/594), done. Submodule path 'bundle/tlib_vim': checked out 'd66948917ce7153e4a961aa5d57e1b0918e20495' Cloning into 'bundle/vim-fugitive'... remote: Counting objects: 1481, done. remote: Compressing objects: 100% (525/525), done. remote: Total 1481 (delta 637), reused 1405 (delta 579) Receiving objects: 100% (1481/1481), 190.02 KiB, done. Resolving deltas: 100% (637/637), done. Submodule path 'bundle/vim-fugitive': checked out '1b7e4070f5f7b7522422f5b00a75b323cc314daf' Cloning into 'bundle/vim-pathogen'... remote: Counting objects: 395, done. remote: Compressing objects: 100% (215/215), done. remote: Total 395 (delta 108), reused 372 (delta 90) Receiving objects: 100% (395/395), 47.73 KiB, done. Resolving deltas: 100% (108/108), done. Submodule path 'bundle/vim-pathogen': checked out 'ab64b4ddd0c184a528780b498a0b0a5b40248f7c' Cloning into 'bundle/vim-unimpaired'... remote: Counting objects: 260, done. remote: Compressing objects: 100% (118/118), done. remote: Total 260 (delta 84), reused 250 (delta 76) Receiving objects: 100% (260/260), 33.89 KiB, done. Resolving deltas: 100% (84/84), done. Submodule path 'bundle/vim-unimpaired': checked out '440629adb4051e5f9920704570d1ff0e88356dc2' Adding terminal shortcut ‘mvim’ # It is packed in the tbz file. Move it to /usr/bin

Performance issues with Quicklook in OS-X Lion

·957 words·5 mins
I have been experiencing issues with Quicklook (press Space on file in Finder or Pathfinder) for some time: it took several second, sometimes 10-15 to show content of simple 1K large property file. It turned out that on of the QuickLook plugins, installed originally way back in Leopard and brought ahead with TimeMachine restores could have been the reason: the QLStephen. For more on that plugin see: http://whomwah.github.com/qlstephen/ https://github.com/whomwah/qlstephen To remove the plugin, go to ~/Library/QuickLook and delete the file (it is the bundle) QLStephen.qlgenerator.

GVM

Installed GVM from: http://gvmtool.net ~ $ curl -s get.gvmtool.net | bash Thanks for using _____/\\\\\\\\\\\\__/\\\________/\\\__/\\\\____________/\\\\_ ___/\\\//////////__\/\\\_______\/\\\_\/\\\\\\________/\\\\\\_ __/\\\_____________\//\\\______/\\\__\/\\\//\\\____/\\\//\\\_ _\/\\\____/\\\\\\\__\//\\\____/\\\___\/\\\\///\\\/\\\/_\/\\\_ _\/\\\___\/////\\\___\//\\\__/\\\____\/\\\__\///\\\/___\/\\\_ _\/\\\_______\/\\\____\//\\\/\\\_____\/\\\____\///_____\/\\\_ _\/\\\_______\/\\\_____\//\\\\\______\/\\\_____________\/\\\_ _\//\\\\\\\\\\\\/_______\//\\\_______\/\\\_____________\/\\\_ __\////////////__________\///________\///______________\///__ Will now attempt installing... Looking for a previous installation of GVM... Looking for JAVA_HOME... Validating JAVA_HOME... Looking for unzip... Looking for curl... Installing gvm scripts... Create distribution directories... Create candidate directories... Download script archive... Extract script archive... Install scripts... Make init script executable... Prime config file... Attempt update of bash profiles... Updated existing /Users/miro/.bash_profile Updated existing /Users/miro/.profile Updated existing /Users/miro/.bashrc Attempt update of zsh profiles... Created and initialised /Users/miro/.zshrc Clean up local variables... All done! Please open a new terminal, or run the following in the existing one: source "/Users/miro/.gvm/bin/gvm-init.sh" Then issue the following command: gvm help Enjoy!!! Using # binsh $ gvm current Using: groovy: 2.0.6 grails: 2.2.0 griffon: 1.1.0 gradle: 1.3 vertx: 1.3.0.final Fix for zsh # http://blog.andresteingress.com/2012/12/14/gvm-the-groovy-environment-manager/

Discovered Trello

·73 words·1 min
Finally a todo/task/project management system that is very good fit. Here is why: is pretty visually modern and dynamic UI has Web back-end (usable from Linux VM) has decent iPhone app allows checklists (multiple) allows color coding Markdown support ecosystem There is Gmello that allows create card from GMail, plus few others that seem to bridge the gap between Evernote, System XYZ and Trello http://trello.com Courtesy of Fog Creek / Joel Spolsky’s company

Custom build of MacVim with file drawer - pure bliss

·92 words·1 min
OK, NERDTree plugin IS great, but this is awesome. Alloy made custom version of MacVim with file drawer: see https://github.com/alloy/macvim/wiki/Building It is available in source - so you have to compile it yourselves. But if you do not want to, I did it and the binary is attached, built with these features: ./configure –with-feature=huge –enable-rubyinterp –enable-pythoninterp –enable-perlinterp –enable-cscope Archive is attached: MacVim.zip If you want to get my set of plugins and customizations, it is on GitHub: - https://github.com/radegast/dotvim,