Skip to main content

Posts

Showing posts from May, 2015

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 tools.zip, 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!)

#!/bin/bash
# Don't forget to install sshpass -> sudo apt-get install sshpass

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

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