Tuesday, May 13, 2014

git tips


Create and checkout branch
git checkout -b iss53

Aplly specific commit
git cherry-pick 6b96adb762fc350681e3b228a01a52422c2cfc1f

Rename branch
git branch -m newname

Find all branches are not merged to master
git branch -r --no-merged release/0.2.4

Wednesday, April 2, 2014

DB2 ALTER

ALTER TABLE
 ALTER COLUMN DROP DEFAULT

ALTER TABLE
 ALTER COLUMN SET NOT NULL

ALTER TABLE
 ALTER COLUMN SET DATA TYPE INTEGER

CALL sysproc.admin_cmd('REORG TABLE BMW.DISCOUNT_RATES_CONFIG')

Friday, August 23, 2013

Mac style scroll

 




$(document).ready(
     function() {
       $("html").niceScroll({cursoropacitymin:0.5, cursorcolor:"#00F"});
     }
);

Saturday, August 3, 2013

DB 2 - rownum


select * from (
    select a.ACCOUNT_ID, ROW_NUMBER() OVER() as rownum FROM USER a
)
where rownum between 300 and 400

Thursday, June 14, 2012

Maven archetype creation:

There 2 ways to crate archetype.
1. Manually
2. From project
From project is the most preferable way, cause saves your time.
http://maven.apache.org/guides/mini/guide-creating-archetypes.html

There is few steps you should do:
mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DgroupId=your-group-id -DartifactId=your-artifact-id -DpackageName=your.package -Dversion=1.0 
mvn org.apache.maven.plugins:maven-archetype-plugin:2.2:create-from-project 
mvn install 
mvn archetype:generate -DarchetypeCatalog=local
1. Create project and fill it
2. Generate archetype from the project which would be generated to target target\generated-sources\archetype
3. Install to archetype to repository
4. Use it