Monday, May 18, 2015

Extract JDK 8 on Windows without the installer

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

  1. Download the JDK from Oracle (the Windows version of course)
  2. Open the file with the archiver (7-zip) and extract its content
  3. You will get a file, extract it in a dedicated folder. This will extract all the jdk files except jar files
  4. Open 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"
  5. Enjoy your new jdk!

Thursday, May 07, 2015

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

Tuesday, May 05, 2015

Dependency management system per language

A great table I found today while surfing :

Source :