Showing posts from 2015

Windows 10 upgrade stucks on Downloading Updates

That's what I had on my laptop. If you have the same issue, open a terminal as administrator and execute the following command to stop "Windows Update Service". You should see your installation continuing.

net stop wuauserv

Activate Windows 7 with your OEM key

Today, I decided to reinstall Windows 7 on my HP Laptop. I never activated it and I lost my original DVD. So I had no choice than install it from an original Windows 7 ISO downloaded on the web.

And that's why I discovered that pre-installed Windows 7 keys cannot be used to activate Windows. So, this is the solution. Open a terminal as administrator and execute the two following commands :

slmgr.vbs -ipk  XXXXX-XXXXX-XXXXX-XXXXX-XXXXX (where XXXX... is your OEM key)
slmgr.vbs -ato


No more to_date in Oracle SQL

You should prefer something like that :

SELECT DATE'2015-08-01'ASd, TIMESTAMP'2015-08-01 15:30:00'

Use Google Translate API for FREE

My company subscribed to Google Apps for Education. So, I though that access to Google Translate API would be included in our contract... but, that's not the case :(

Hummm... hummm... let's hack this for free.

Prerequisite is to have a Google account (even a free gmail account). What we will do is the create a sctipt on Google that will use the translate api freely and publish it as a REST web service which has the same JSON output format as the original.

Let's go!

Connect to and create an empty project.Copy paste the code belowPublish it as web applicationGrant access to the url of your script to anonymous access if needed

var mock = {

function doGet(e) {
  e = e || mock;

  var sourceText = ''
  if (e.parameter.q){
    sourceText = e.parameter.q;

  var sourceLang = 'auto';
  if (e.parameter.source){
    sourceLang = e.parameter.source;

  var targetLan…

The great alternative to JRebel

I'm an old user and addict of JRebel. I started to use it on open source projects and in professional contexts. From the beginning, I've been convinced that the licensing mode was wrong because of its lifetime. Asking for license renewal each year is boring. So, I decided to look for FREE alternative solutions and finally I recently found one.

This solution is efficient for maven projects developed with Eclipse. It is base on :

Hotswap Agent project : Source Lookup plugin for Eclipse :
I tested it with Java 7 & Java 8. I work on web applications that run on Tomcat. I developed wih Spring (IoC), sometimes Hibernate and Vaadin

Hotswap Agent installation consists on the deployment of a patch for your JVM. You just have to download the corresponding patch here : Then, download the hotswap-agent.jar from here :…

Override local changes with Git

For all SVN users like me, Git is great but a little bit more complex than all stuffs. Imagine, you want to get code from your remote repo and override your local changes (everything your commited on your local repo). This can be done in two step :
Reset your local repo with last fetched head : git reset --hard FETCH_HEADThen update local repo with remote one and merge changes : git pull Hope that could save your day!

CSS selector (in french)

Extract JDK 8 on Windows without the installer

That's something useful when you don't have admin rights on your machine. So :

Download the JDK from Oracle (the Windows version of course)Open the file with the archiver (7-zip) and extract its contentYou will get a file, extract it in a dedicated folder. This will extract all the jdk files except jar filesOpen a command line and go to this folder. Run the following command that will convert all 'pack' files into 'jar' files : for /r %i in (*.pack) do .\bin\unpack200.exe "%i" "%~pi%~ni.jar"Enjoy your new jdk!

Clone all your git repositories over ssh with one small script

I worked on this with my colleague Rivo. Usefull when you have many projects (and many repos!)

# Don't forget to install sshpass -> sudo apt-get install sshpass

PROJECTS=`sshpass -p "$PASSWORD" ssh $USERNAME@$HOST ls -d $ROOT_PATH/*.git | sed -r 's/^.+\///' | sed -r 's/\.git//'`

for prj in $PROJECTS
    rm -rf $prj
    sshpass -p "$PASSWORD" git clone ssh://$USERNAME@$HOST/$ROOT_PATH/$prj.git

Dependency management system per language

A great table I found today while surfing :

Clojure : ClojarsErlang : HexGo : GoDocHaskell : HackageJava : Maven CentralJavaScript : tnpmBower.NET : nugetPerl : CPANPHP : Composer / Packagist / PearPython : PyPIRuby : Bundler / RubygemsRust : Crates
Source :

Start Sublime Text 3 from command line (terminal) on MacOS

ln -s "/Applications/Sublime" /usr/local/bin/sublime


How to make a grep search on SVN

Want to perform a 'grep' on every files of your subversion repository? Great. Let's have some linux bash fun... Just adapt the following script to your SVN repo structure and enjoy!

 svn ls --username 'alex' --password 'xxx' -r 'HEAD' -R "http://url/svn/repo/" | grep /trunk/ | while read file;
   result=`expr match "$file" '.*/$' | cat`
   if [ $result == 0 ]; then  
     result=`svn cat  --username 'alex' --password 'xxx' "http://url/svn/repo/$file" | grep "STRING_TO_FIND" | cat`
     if [ -n "$result" ]; then
       echo "http://url/svn/repo/$file --> $result"