github

GitHub is a web-based Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features. read more at WikiPedia

  • Avoid infamous change - restart - wait - check development lifecycle!

    Stop waiting for build & deploy make code changes. Write code and refresh your browser!

    Use DCEVM and add java fields, methods, classes and use them without restarting your application server, it's a modification of the HotSpot VM that allows unlimited class redefinition at run-time. You can add/remove fields and methods and change the super types of a class at run-time. The features of DCEVM are likely to be integrated in a future update of Java 8 as part of JEP 159.

    View code changes instantly and increases team velocity!

              DCEVM                  JVM Hot Swap         
    Changes to method bodies  yes yes
    Adding/removing Methods  yes  no
    Adding/removing constructors  yes  no
    Adding/removing fields  yes  no
    Adding/removing classes  yes  no
    Adding/removing annotations  yes  no
    Changing static field value  yes  no
    Adding/removing enum values  yes  no
    Modifying interfaces  yes  no
    Replacing superclass  yes  no
    Adding/removing implemented interfaces  no  no
    Initializes new instance fields  yes  no

     

  • Clue a command line tool for Apache Lucene search software

    Lucene Core  is an open-source search software, provides Java-based indexing and search technology, as well as spellchecking, hit highlighting and advanced analysis/tokenization capabilities. Luke is a handy development and diagnostic tool, which accesses already existing Lucene indexes and allows you to display and modify their content.

    Luke is awesome, but often times it is not feasible to inspect an index on a remote machine using a GUI. That's where Clue comes in. You can SSH into your production box and inspect your index using your favorite shell

    Another important feature for Clue is the ability to interact with other Unix commands via piping, e.g. grep, more etc.

    Interactive Mode:

    ./bin/clue.sh my-idx

    Non-interactive Mode:

    ./bin/clue.sh my-idx command args

    Command list:

    ./bin/clue.sh my-idx help
  • Display the short GIT version hash as build identifier in TeamCity

    TeamCity is a Continuous integration and build management server from JetBrains.

    As the first build step, create a custom script that reads %build.number%, and uses service messages to append the short GIT hash programmatically.

    image

    Here’s an example using a bash script pasted right into the TeamCity GUI (Runner type: Command Line, Run: Custom Script):

    GIT_HASH=%build.vcs.number%
    GIT_HASH_SHORT=${GIT_HASH:0:7}
    echo "##teamcity[buildNumber '#${GIT_HASH_SHORT}']"
     
  • Enjoy Fighting regressions with git bisect

    As Git Bisect is not clear a lot of people, here is a nice PDF to look at Enjoy Fighting regressions with git bisect, LinuxCon EU 2013.pdf

    it is about "Linux" combinational explosion... Bug software have the following properties (not desired):

    • has many different "configurations"
    • may fail under one configuration but not another

    N configurations, T tests and C new commits means that a release needs:

    C * N * T tests performed

    where N and T, at least, are growing with the size of the software.

    Git Bisect help find a first bad commit and use a binary search algorithm for efficiency if possible.

  • git-branch-renamer-maven-plugin

    When working with many feature/release/bugix/hotfix branches, it is a bad idea to start changing the pom version as this will create merge conflicts using pull request. this plugin allow you to keep in ALL branches the same pom version for all your projects, for example MASTER-SNAPSHOT the version will be derived from branch name automagically :-)

    You may want to read more first these 2 short articles

    git-branch-renamer-maven-plugin allow you to keep in ALL branches the same pom version for all your projects: for example MASTER-SNAPSHOT and never change it again.

    the project version will be derived from branch name automatically when running in your continuous integration server.

    branch name feature/xxxx

    • <version>xxxx-SNAPSHOT</version> (default)
    • <version>xxxx</version> (release = true)
    • <version>0-xxxx-SNAPSHOT</version> (forceNumericalVersion = true)
    • <version>feature-xxxx-SNAPSHOT</version> (filterOutBranchQualifier = false)

    The project is hosted at Github https://github.com/cedricwalter/git-branch-renamer-maven-plugin 

  • Merging Two Git Repositories Into One Repository Without Losing File History

    There seems to be a lot of way to merge two #git repositories into one repository without losing file history. Here is another straightforward method.

    This method do not use #submodules or #subtree merges. it uses regular merge operations.

    1. Create a new empty repository New.
    2. Make an initial commit because we need one before we do a merge.
    3. Add a remote to old repository A.
    4. Merge A/master to New/master.
    5. Make a subdirectory folderA.
    6. Move all files into subdirectory folderA.
    7. Commit all of the file moves.
    8. Repeat 3-6 for another repository.
    mkdir result
    cd result
    git init
    touch README.MD
    git add .
    git commit -m "added readme.md"
    
    Step 3 to 6
    git remote add -f A https://github.com/A.git
    git fetch --all
    git merge --allow-unrelated-histories  A/master
    mkdir folderA
    git mv -k * folderA
    git commit -m “moved A files into subdir folderA”
    
  • Schema Validation for Joomla 3.1 Extensions

    joomlalovexsd

    Full support for Joomla 3.1 has been added to the project “Schema Validation for Joomla Extensions” (GitHub), tested with all 113 manifests of Joomla 3.1.5! (components, modules, plugins and templates)

    Without them, Joomla accept any entry in manifest xml and never complains about

    • Mistyping, like a valid xml but that the Joomla installer do not understand or only partially,
    • Wrong constructs, xml tag child misplaced,
    • Invalid data type, like a path not being a valid path, an expected integer being a text and so on…

    Joomla just silently die during install or install only partially extensions. These days are over and all developers with any decent IDE will be able to

    • Validate while typing,
    • Enjoy auto completion.
    • Have an up to date documentation of all possibilities in Joomla’s manifest.

    What’s new

    see https://github.com/cedricwalter/joomla-xsd/commit/8b315332e8c0fa515da19f15a4c547f446850024

    component / module / plugins

    • add in <menu> support for attribute value img="class:banners">
    • add in <menu> support for attribute value view="anyString"
    • add in <menu> support for attribute value alt="anyString"
    • add to type="cmsVersionType" version 3.1
    • add support for <menu link="option=com_finder">COM_FINDER</menu> (finder.xml)
    • In <extension> attribute valuemethod="" is now optional
    • add new <help key="ANY_STRING" />
    • add in <field> support for attribute value first="anyNumber"
    • add in <field> support for attribute value last="anyNumber"
    • add in <field> support for attribute value step="anyNumber"
    • add in <field> support for attribute value published="" (mod_articles_category.xml)
    • add in <field> support for attribute value format="%Y-%m-%d %H:%M:%S"
    • add in <field> support for attribute value disable="separator" (mod_login.xml)
    • add in <fields> support for attribute value addfieldpath="validPath" (mod_finder.xml)
    • in <field> validate css class names class="btn-group" or class="btn-group btn1 blue" orclass=""
    • Allow empty without fieldset (vote.xml) <fields name="params"> </fields>
    • In <authorEmail> consider N/A as a valid email
    • Attribute 'label' now optional on element 'field'. <field name="spacer3" type="spacer" hr="true" />
    • Support for validate <field> type="url" (sef.xml)
    • in <fieldset> allow Attribute value label="" to appear in element (debug.xml)
    • allow <field> to have type attribute value category (contactcreator.xml)
    • allow <field> to have new attribute extension=com_* (contactcreator.xml)
    • In <media> attribute destination value is now optional
    • In <fieldset> add optionaladdfieldpath="" and validate that it is a valid path
    • In ```<option value="" empty values are now allowed
    • <updateservers> is now available in plugins manifests
    • In <field> type now support type="modal_article" or from enum (using xsd union)

    Plugins only

    • in <file plugin="weblinks">weblinks.php</file>

    Template only

    • In <extension> attribute value method="" is now optionnal
    • In <extension> addattribute value client=""
    • add <languages></languages>

    These files will be hopefully soon merged into Joomla CMS  (GitHub project) and officialy supported by Joomla

  • Stitching several git repositories into a git fast-import stream

    git-stitch-repo

    Stitch several git repositories (merging git repository) into a git fast-import stream from Git-FastExport

    Installation

    $ perl -MCPAN -e shell
      
    cpan[6]> i /fastexport/
    	Distribution    BOOK/Git-FastExport-0.107.tar.gz
    	Module  < Git::FastExport        (BOOK/Git-FastExport-0.107.tar.gz)
    	Module  < Git::FastExport::Block (BOOK/Git-FastExport-0.107.tar.gz)
    	Module  < Git::FastExport::Stitch (BOOK/Git-FastExport-0.107.tar.gz)
    	4 items found
    
    cpan[6]> install BOOK/Git-FastExport-0.107.tar.gz
    
    cpan[6]> CTRL-D
    

    Usage

    git-stitch-repo will process the output of git fast-export --all --date-order on the git repositories given on the command-line, and create a stream suitable for git fast-import that will create a new repository containing all the commits in a new commit tree that respects the history of all the source repositories. Typical usage is like this:
    git clone https://github.com/xxxx/A.git
    git clone https://github.com/xxxxx/B.git
    
    $ ls
    A B
    
    mkdir result
    cd result
    git init
    git-stitch-repo ../A:folderA ../B:folderB | git fast-import
    
    # pull both repository in a new branch for examples
    git checkout -b newBranch
    git pull . master-A
    git pull . master-B
    
    # when finished delete unused branches
    git branch -d master-A 
    git branch -d master-B