Thursday, 21 October 2010

SQLdeveloper & showing the full date

I keep getting this every time I install SQLDeveloper.

The date shown is just dd/mm/yyyy with no hours:minutes:seconds

The solution can be found here on Zenx's blog, but to save me looking here it is also.

1. From SQL Developer, open menu Tools >> Preferences.
2. From the Preferences dialog, select Database >> NLS Parameters from the left panel.
3. From the list of NLS parameters, enter DD-MON-RR HH24:MI:SS into the Date Format field.
4. Save and close the dialog, done!

Thanks Zenx.

Also, if you want milli-seconds add ':SSSSS' at the end.

Wednesday, 20 October 2010

git & github from windows

While learning Grails and working though 'Grails in Action' I wanted to save my work to a repository. SVN can be a pain to setup on windows and many people use github & so I thought I would give it a go.

Sadly I am on a windows PC but I have just been so pleasantly surprised as to how easy it was.

This is what I had to do:
  1. I work from a cygwin command shell. In this I had to have ssh & git executables installed.
  2. help to set up the ssh key is here .
  3. I did not realise that git acts as a local repository as well as a public repository so you are under no obligation to upload your work. The local set up is a breeze and is described in this excellent tutorial, running the commands from my cygwin shell.
  4. There is even a GUI with the command 'gitk'
  5. create the repository on the remote server such as the public github repository
  6. Once you want to upload the code to a public github repository it is a simple case of running the following commands:
  7. cd existing_git_repo
    git remote add origin git@github.com:bill-comer/hubbub.git
    git push origin master
  8. And you can download code from github using the following:
  9. git clone   git@github.com:bill-comer/hubbub.git
  10. As I am on a windows PC I had to tweak the SSH2 key location. In eclipse go to Preferences/Network Conections/SSH2. Here I set the SSH2 home to where my cygwin .ssh directory is. In my case C:\cygwin\home\comerb\.ssh.


Now go ahead and enjoy a free and easy to use code repository.