jQuery Usage Notes

Some jQuery usage notes for useful/common stuff:

To run script when the browser reaches ready state:

$(document).ready(function(){
    //do stuff here
});

Detecting browser type, eg:

if ($.browser.webkit){
     alert( "this is webkit!" );
}

Valid values are webkit, opera, msie, mozila

See here.

Change attribute value of an element:

$('#elementId').attr('attributename', 'new attribute value');

More, see here.

EE6 and EE7 Maven deps for JBoss AS7 and WildFly8

For EE7 on WildFly8.x, use:

Full profile:

        <dependency>
            <groupId>org.jboss.spec</groupId>
            <artifactId>jboss-javaee-7.0</artifactId>
            <version>1.0.0.Final</version>
            <type>pom</type>
            <scope>provided</scope>
        </dependency>

Web profile:

        <dependency>
            <groupId>org.jboss.spec</groupId>
            <artifactId>jboss-javaee-web-7.0</artifactId>
            <version>1.0.0.Final</version>
            <type>pom</type>
            <scope>provided</scope>            
        </dependency

For EE6 on JBoss AS7.x, use:

        <dependency>
            <groupId>org.jboss.spec</groupId>
            <artifactId>jboss-javaee-6.0</artifactId>
            <version>1.0.0.Final</version>
            <type>pom</type>
            <scope>provided</scope>
        </dependency>

Info from JBoss’s EE spec Git repo here and referenced from this question here.

Git notes (3) – tagging

To tag all files at a current point in time (e.g. to track a release), use:

git tag -a tagname -m "tag description"

To view current tags:

git tag

To show commits associated with a tag:

git show tagname

To push a tag to a remote repo:

git push remotename tagname

Git notes (2): Checking out a branch

Continuing from other notes here.

To checkout a branch:

Clone a repo:

git clone user@server:reponame.git

Fetch all branches:

git fetch remote_name

List all available branches:

git branch -v -a

Checkout required branch:

git checkout -b branch_name remote_name/branch_name

Fetch all changes on branch:

git fetch