A command-line interface (CLI), also known as command-line user interface, console user interface, and character user interface (CUI), is a means of interacting with a computer program where the user (or client) issues commands to the program in the form of successive lines of text (command lines). read more at WikiPedia

  • Lucene Core&160; 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/ my-idx

    Non-interactive Mode:

    ./bin/ my-idx command args

    Command list:

    ./bin/ my-idx help
  • eclipse&160;

    A very little trick that allow you to quickly run any operation involving a DOS command on an Eclipse project. Go to the external launcher, and create a new configuration.

    This trick may be useful for running your Maven set of command without any dependencies to M2Eclipse.



    Location:&160; {ENV_VAR:COMSPEC}
    Working Directory: {project_loc}


    Returns the value of an environment variable. An environment variable name must be specified as an argument.


  • Google Chrome Command Line Switches

    While a lot of them are not interesting for the casual user, some are really interesting for us developers. I put at the top the most interesting one in bold, aka the one I use always.

    From the source file at The list of switches is evolving so consider looking at source code to check for changes. Right click on Google Chrome desktop icon and use properties





    Enable syncing bookmarks to a Google Account.


    Causes the browser to launch directly in incognito mode.

    --disable-hang-monitor Suppresses hang monitor dialogs in renderer processes.
    --disable-metrics Completely disables UMA metrics system.
    --disable-metrics-reporting Disables only the sending of metrics reports. In contrast to
    kDisableMetrics, this executes all the code that a normal client would use
    for reporting, except the report is dropped rather than sent to the server.
    This is useful for finding issues in the metrics code during UI and
    performance tests.
    --assert-test Causes the browser process to throw an assertion on startup.
    --renderer-assert-test Causes the renderer process to throw an assertion on launch.
    --crash-test Causes the browser process to crash on startup.
    --renderer-crash-test Causes the renderer process to crash on launch.
    --renderer-startup-dialog Causes the renderer process to display a dialog on launch.
    --plugin-startup-dialog Causes the plugin process to display a dialog on launch.
    --testshell-startup-dialog Causes the test shell process to display a dialog on launch.
    --plugin-launcher="path\to\purify /Run=yes"
    Specifies a command that should be used to launch the plugin process. Useful
    for running the plugin process through purify or quantify.
    --channel The value of this switch tells the child process which
    IPC channel the browser expects to use to communicate with it.
    --testing-channel The value of this switch tells the app to listen for and broadcast
    testing-related messages on IPC channel with the given ID.
    --homepage The value of this switch specifies which page will be displayed
    in newly-opened tabs. We need this for testing purposes so
    that the UI tests don't depend on what comes up for
    --start-renderers-manually When this switch is present, the browser will throw up a dialog box
    asking the user to start a renderer process independently rather
    than launching the renderer itself. (This is useful for debugging.)
    --renderer Causes the process to run as renderer instead of as browser.
    --renderer-path Path to the exe to run for the renderer subprocess
    --plugin Causes the process to run as plugin host
    --single-process Runs the renderer and plugins in the same process as the browser
    --process-per-tab Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own
    renderer process. We default to using a renderer process for each
    site instance (i.e., group of pages from the same registered domain with
    script connections to each other).
    --process-per-site Runs a single process for each site (i.e., group of pages from the same
    registered domain) the user visits. We default to using a renderer process
    for each site instance (i.e., group of pages from the same registered
    domain with script connections to each other).
    --in-process-plugins Runs plugins inside the renderer process
    --no-sandbox Runs the renderer outside the sandbox.
    --safe-plugins Runs the plugin processes inside the sandbox.
    --trusted-plugins Excludes these plugins from the plugin sandbox.
    This is a comma separated list of plugin dlls name and activex clsid.
    --test-sandbox Runs the security test for the sandbox.
    --user-data-dir Specifies the user data directory, which is where the browser will look
    for all of its state.
    --app Specifies that the associated value should be launched in "application" mode.
    --upload-file Specifies the file that should be uploaded to the provided application. This
    switch is expected to be used with --app option.
    --dom-automation Specifies if the dom_automation_controller_ needs to be bound in the
    renderer. This binding happens on per-frame basis and hence can potentially
    be a performance bottleneck. One should only enable it when automating
    dom based tests.
    --plugin-path Tells the plugin process the path of the plugin to load
    --js-flags Specifies the flags passed to JS engine
    --geoid The GeoID we should use. This is normally obtained from the operating system
    during first run and cached in the preferences afterwards. This is a numeric
    value; see .
    --lang The language file that we want to try to open. Of the form
    language[-country] where language is the 2 letter code from ISO-639.
    --debug-children Will add kDebugOnStart to every child processes. If a value is passed, it
    will be used as a filter to determine if the child process should have the
    kDebugOnStart flag passed on or not.
    --wait-for-debugger-children Will add kWaitForDebugger to every child processes. If a value is passed, it
    will be used as a filter to determine if the child process should have the
    kWaitForDebugger flag passed on or not.
    --log-filter-prefix Will filter log messages to show only the messages that are prefixed
    with the specified value
    --enable-logging Force logging to be enabled. Logging is disabled by default in release
    --disable-logging Force logging to be disabled. Logging is enabled by default in debug
    --log-level Sets the minimum log level. Valid values are from 0 to 3:
    INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3.
    --dump-histograms-on-exit Dump any accumualted histograms to the log when browser terminates (requires
    logging to be enabled to really do anything). Used by developers and test
    --remote-shell-port enable remote debug / automation shell on the specified port
    --uninstall Runs un-installation steps that were done by chrome first-run.
    --omnibox-popup-count Number of entries to show in the omnibox popup.
    &160; &160;
    --automation-channel The value of this switch tells the app to listen for and broadcast
    automation-related messages on IPC channel with the given ID.
    --restore-last-session Indicates the last session should be restored on startup. This overrides
    the preferences value and is primarily intended for testing.
    Chrome supports a playback and record mode. Record mode saves *everything*
    to the cache. Playback mode reads data exclusively from the cache. This
    allows us to record a session into the cache and then replay it at will.
    --no-events Don't record/playback events when using record & playback.
    Make Windows happy by allowing it to show "Enable access to this program"
    checkbox in Add/Remove Programs->Set Program Access and Defaults. This
    only shows an error box because the only way to hide Chrome is by
    uninstalling it.
    --make-default-browser Make Chrome default browser
    --proxy-server Use a specified proxy server, overrides system settings. This switch only
    affects HTTP and HTTPS requests.
    Chrome will support prefetching of DNS information. Until this becomes
    the default, we'll provide a command line switch.
    --debug-print Enables support to debug printing subsystem.
    --allow-all-activex Allow initialization of all activex controls. This is only to help website
    developers test their controls to see if they are compatible in Chrome.
    Note there's a duplicate value in (to avoid
    dependency on chrome module). Please change both locations at the same time.
    --disable-dev-tools Browser flag to disable the web inspector for all renderers.
    --always-enable-dev-tools Enable web inspector for all windows, even if they're part of the browser.
    Allows us to use our dev tools to debug browser windows itself.
    --tab-count-to-load-on-session-restore Used to set the value of SessionRestore::num_tabs_to_load_. See
    session_restore.h for details.
    const wchar_t kTabCountToLoadOnSessionRestore[] =
    --memory-profile Enable dynamic loading of the Memory Profiler DLL, which will trace
    all memory allocations during the run.
    --memory-model Configure Chrome's memory model.
    Does chrome really need multiple memory models? No. But we get a lot
    of concerns from individuals about how the changes work on *their*
    system, and we need to be able to experiment with a few choices.
    --enable-file-cookies By default, cookies are not allowed on file://. They are needed in for
    testing, for example page cycler and layout tests. See bug 1157243.
    --start-maximized Start the browser maximized, regardless of any previous settings.
    TODO(pjohnson): Remove this once bug 1137420 is fixed. We are using this
    as a workaround for not being able to use moveTo and resizeTo on a
    top-level window.
    --enable-watchdog Spawn threads to watch for excessive delays in specified message loops.
    User should set breakpoints on Alarm() to examine problematic thread.
    Usage: -enable-watchdog=[ui][io]
    Order of the listed sub-arguments does not matter.
    --first-run Display the First Run experience when the browser is started, regardless of
    whether or not it's actually the first run.
    --message-loop-histogrammer Enable histograming of tasks served by MessageLoop. See about:histograms/Loop
    for results, which show frequency of messages on each thread, including APC
    count, object signalling count, etc.
    --import Perform importing from another browser. The value associated with this
    setting encodes the target browser and what items to import.
    --silent-dump-on-dcheck Change the DCHECKS to dump memory and continue instead of crashing.
    This is valid only in Release mode when --enable-dcheck is specified.
    --disable-prompt-on-repost Normally when the user attempts to navigate to a page that was the result of
    a post we prompt to make sure they want to. This switch may be used to
    disable that check. This switch is used during automated testing.
    --disable-popup-blocking Disable pop-up blocking.
    --disable-javascript Don't execute JavaScript (browser JS like the new tab page still runs).
    --disable-java Prevent Java from running.
    --disable-plugins Prevent plugins from running.
    --disable-images Prevent images from loading.
    --use-lf-heap Use the low fragmentation heap for the CRT.
    --gears-plugin-path Debug only switch to specify which gears plugin dll to load.
    --gears-in-renderer Switch to load Gears in the renderer process.
    --new-http Enable new HTTP stack.
    --javascript-debugger-path Allow loading of the javascript debugger UI from the filesystem.


  • 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"
    Step 3 to 6
    git remote add -f A
    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”
  • git-stitch-repo

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


    $ 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


    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
    git clone
    $ 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