Sunday, November 27, 2011

Upgrading squeezebox server on whs & Visual C++ dependancy

I was upgrading my squeezebox server 7.6 on my windows home server via the whs console | Settings | Add-ins. To install v7.7 first I had to uninstall 7.6, no problem. When I tried to install v7.7, which has been renamed Logitech Server, it said it needed the Microsoft Visual C++ 2010 SP1 Redistributable Package (x86) and gave a download link from the Microsoft site. To install this I did the following.
  1. Downloaded vcredist_x86.exe to my machine.
  2. I used robycopy from the command line to copy the file to a shared directory on whs. (I needed to create the directory in whs, as when created via remote desktops it did not have permission to write to it).
  3. From the laptop I ran remote desktops. I needed to login from remote desktops to my whs server as the administrator. I needed to launch the command line to run the installation file.

Sunday, September 25, 2011

Syncing with WHS

I wanted to sync some directories on my machine to a shared folder on my server which runs Window Home Server. I used my backup s/w of choice, Cobian backup. A large percentage of files did not copy with errors like "The specified network name is no longer available" / "The network path was not found" / "The filename, directory name, or volume label syntax is incorrect".

I also tried the free microsoft synctoy. It did not copy any additional files on the same sync with some of the same errors.

What worked for me in the end was surprisingly the free Microsoft, Robocopy. It has a default feature to skip files that already appear in the destination folder with identical size and timestamp.

robocopy source destination /e /zb /r:5 /purge

e.g. robocopy "f:\my documents\my music" \\myserver\music /e /zb /r:5 /purge

Friday, June 25, 2010

Groovy tip: initialise ArrayList












Q I have an ArrayList of known length, each element containing a comma separated string, some list members may be empty, the list starts empty and is built up. But the list elements start null, is there a way to initialise them?
A def myArrayList = (0..99).collect { '' }



Eclipse tip: switch/change tab

Tuesday, March 30, 2010

Git tip: add to comments












Q I have done a git commit but want to append to the comments I have added.
A In the root of your repository directory you will find a .git folder. In there there is a file "COMMIT_EDITMSG" which contains the comments for the current commit. To bring up the default editor (VIM, unless you have your custom editor specified in the [core] section of .gitconfig - located in the home directory - e.g. "editor = e:\\JGSoft\\EditPadPro6\\Editpadpro.exe, you can do git commit --amend



Eclipse tip: switch/change tab

Wednesday, March 24, 2010

Eclipse tip: switch/change tab












Q I have looked at a lot of the Eclipse keyboard shortcut cheat sheet lists but I can't find a shortcut to change tab in the editor?
A Use ctrl+e to pop up a list of the open tabs which you can scroll though to change focus. Alternatively, you can use ctrl+page-up / ctrl+page-down to navigate to the right/left tabs respectively.

Tuesday, March 23, 2010

Git Tip: unstaging



Q In Git you have your working tree and your repository but the necessary in-between state is the staging area. Files get staged by doing a git add. What's the opposite of a git add, i.e. how can I "unstage" a file?
A
Updated 25 August 2011.
    Embarrassingly, I just saw the comments now over a year later and it turns out I have a lot to learn with GIT, I have not used it enough and got this completely wrong as the comments testify. I leave my deleted answer for my own education. I have turned on comment notification now!
      As the handy command line help on a git status shows, files can be unstaged with git rm.

        To wipe any changes you have made since the last commit, do a git reset HEAD <file name with complete path>

        Monday, March 22, 2010

        Cygwin tip: copying text












        Q How can I copy text in a cygwin window?
        A In the system menu, select properties and then Options | Edit Options | QuickEdit mode. You can then highlight text in the window and press enter to copy it to the clipboard.

        Subscribe with a reader