2013-12-10

Moving Outlook messages with one click (2)

I now have Outlook 2013, multiple accounts and have upgraded from Exchange server 21007 to 2010 which meant my short cut macros have got lost.  so I am starting again and revising my old post.

I need to create a macro to move the current e-mail to a specified folder, normally Inbox Done as a sub folder of my inbox.  This allows me to keep my inbox clear and not read emails twice and not action them.

1) Create a macro

a) Show the developer tab in Outlook.
Microsoft help is here.

File->Options->Customize Ribbon>Developer (checked)

b) Developer –>Macros –> (type new name) –>Create
This creates a stub and open it in the VBA editor, eg:

Sub test()
  MsgBox "Hi"
End Sub

This can now be run from the developer macros window.

I couldn’t find the general short cut tools that used to be there,  However if you customise the Quick Access Tool bar then Alt+n will give you the nth button.  So in my case Alt+4 gives me my macro.  This works across all of my inboxes.

2) Changed the code to below for moving the message in each mail account:

Sub test()
'Sub MoveSelectedMessagesToToDo()
    On Error Resume Next

    Dim objFolder As Outlook.MAPIFolder, objInbox As Outlook.MAPIFolder

    Dim objNS As Outlook.NameSpace, objItem As Outlook.MailItem

    Set objNS = Application.GetNamespace("MAPI")

    Set objInbox = objNS.GetDefaultFolder(olFolderInbox)

    If Application.ActiveExplorer.Selection.Count = 0 Then
        'Require that this procedure be called only when a message is selected
        Exit Sub
    End If

 
    For Each objItem In Application.ActiveExplorer.Selection
        If objFolder.DefaultItemType = olMailItem Then
            If objItem.Class = olMail Then
                'Find which account this is in
                Set mailParent = objItem.Parent
                'Find the matching object folder for that account
                Set objFolder = mailParent.Folders.Item("Inbox Done")
                'if found the folder then move else error
                If objFolder Is Nothing Then
                    MsgBox "This folder doesn't exist!", vbOKOnly + vbExclamation, "INVALID FOLDER"
                Else
                    'move the item to that folder
                    objItem.Move objFolder
                End If
                Set mailParent = Nothing
                Set objFolder = Nothing
            End If
        End If
    Next

    Set objItem = Nothing
    Set objFolder = Nothing
    Set objInbox = Nothing
    Set objNS = Nothing

End Sub

I also programmed the Microsoft keyboard to provide a hot key for the Alt+4 which mean a single keystroke to do the work.

Apart from my old post, I have used:

http://www.vogella.com/articles/MicrosoftOutlookMacros/article.html

2013-01-17

Gauss cannon

I got some Buckyball cubes for Christmas and I just wanted to remember a good link on building a guass cannon: http://scitoys.com/scitoys/scitoys/magnets/gauss.html

2013-01-14

staticgenerator

I am building a static website but want to use a generation tool to build all the pieces.  I am using Python and originally looked at Hyde.  But I had difficulites and want to learn the Django frameworks. So instead of using Hyde, I am going to try out creating sites using Django and then using staticgenerator to take copies. pystatic is a newer alternative.

The original documentation at http://superjared.com/projects/static-generator/ has gone but the project is here:

http://pypi.python.org/pypi/staticgenerator/1.4.1

and there is a clone here:

http://superjared.com/projects/static-generator/

I have copied the documentation here from a Wayback Machine archive of the original:

http://web.archive.org/web/20101221135325/http://superjared.com/projects/static-generator/

StaticGenerator for Django

StaticGenerator is on GitHub!

Introduction

How many CPU cycles do you suppose are wasted on blogs that are generated every request? Wouldn’t it make more sense to generate them only when they’re updated? StaticGenerator is a Python class for Django that makes it easy to create static files for lightning fast performance.

Download

You can get StaticGenerator using easy_install:

easy_install staticgenerator


Or download from the cheeseshop.



Usage



There are two ways to generate the static files. Both setups first require WEB_ROOT to be set in settings.py:



WEB_ROOT = '/var/www/example.com/public/'


Method 1 (preferred): Middleware


As of StaticGenerator 1.3, Middleware is available to generate the file only when the URL is requested. This solves the 404 Problem (see below).



First, add Regexes of URLs you want to cache to settings.py like so:



STATIC_GENERATOR_URLS = (
r'^/$',
r'^/(blog|about|projects)',
)


Second, add the Middleware to MIDDLEWARE_CLASSES:



MIDDLEWARE_CLASSES = (
...snip...
'staticgenerator.middleware.StaticGeneratorMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
...snip...
)


Note: You must place the StaticGeneratorMiddleware before FlatpageFallbackMiddleware if you use it.



When the pages are accessed for the first time, the body of the page is saved into a static file. This is completely transparent to the end-user. When the page or an associated object has changed, simply delete the cached file (See notes on Signals).



Method 2: Generate on Save


The second method works by saving the cache file on save. This method fakes a request to get the appropriate content. In this example we want to publish our home page, all live Posts and all FlatPages:



# Passing url, a QuerySet and Model
from staticgenerator import quick_publish
quick_publish('/', Post.objects.live(), FlatPage)


Deleting files and paths is just as easy:



from staticgenerator import quick_delete
quick_delete('/path-to-delete/')


Note: Directory deletion fails silently while failing to delete a file will raise an exception.



The “404 Problem”


The second method suffers from a problem herein called the “404 problem”. Say you have a blog post that is not yet to be published. When you save it, the file created is actually a 404 message since the blog post is not actually available to the public. Using the older method you’d have to re-save the object to generate the file again.



The new method solves this because it saves the file only when the URL is accessed successfully (read: only when the HTTP status is 200).



Using Signals


Integrating with existing models is easy using Django’s signal dispatcher. Simply create a function to delete your models, and connect to the dispatcher:



from django.contrib.flatpages.models import FlatPage
from blog.models import Post
from django.db.models import signals
from staticgenerator import quick_delete

def delete_index(sender, instance):
quick_delete(instance, '/')

signals.post_delete.connect(delete_index, sender=Post)
signals.post_delete.connect(delete_index, sender=FlatPage)


Every time you save a Post or FlatPage it deletes the static file (notice that I add ‘/’ so my homepage is deleted as well). What happens when a comment is added? Just delete the corresponding page:



from django.contrib.comments.models import Comment, FreeComment

def publish_comment(sender, instance):
quick_delete(instance.get_content_object())

signals.post_save.connect(publish_comment, sender=Comment)
signals.post_save.connect(publish_comment, sender=FreeComment)


Configure your front-end



Sample Nginx configuration


This configuration snippet shows how Nginx can automatically show the index.html page generated by StaticGenerator, and pass all Django requests to Apache.



# This example configuration only shows parts relevant to a Django app
http {

upstream django {
# Apache/mod_python running on port 7000
server example.com:7000;
}

server {
server_name example.com;
root /var/www/;

location / {
if (-f $request_filename/index.html) {
rewrite (.*) $1/index.html break;
}
if (!-f $request_filename) {
proxy_pass http://django;
break;
}
}

}

}


It’s not for Everything



The beauty of the generator is that you choose when and what urls are made into static files. Obviously a contact form or search form won’t work this way, so we just leave them as regular Django requests. In your front-end http server (you are using a front-end web server, right?) just set the URLs you want to be served as static and they’re already being served.

2013-01-13

Installing Hyde for static websites.

Hyde seems an excellent fit for drummonds.net for producing static sites.  It is based on Python and Django.  The installation instruction as reported by Philip Mat are reported to be mixed so I decided to follow his and see how it goes.  I was also going to install it on Windows. I have installed git (short time since my computer was rebuilt) pip,Django,pyYAML,markdown

I put into \python27\scripts with the command:

git clone https://github.com/lakshmivyas/hyde.git

I downloaded the sample code

git clone https://github.com/philipmat/jekyll_vs_hyde.git

I used mongoose.exe to run the code and it worked well on http://localhost:8080/


There was also blogofile and pelican as alternative packages.

2013-01-04

Sample Python script to control Photoshop

I have been using Python to script Photoshop and came across something that wasn’t immediately obvious to me:

A sample section would be:

// Create a new 2x4 inch document and assign it to a variable
var docRef = app.documents.add( 250, 33 )

which I got to work as:

# Create a new 2x4 inch document and assign it to a variable.
docs = psApp.Documents
docRef = docs.Add(250,33)

you are not able to two level of indirection on COM objects but keep need to making Python objects of the references.

The complete sample code is:

import win32com.client

psApp = win32com.client.Dispatch("Photoshop.Application")

# Remember current unit settings and then set units to
# the value expected by this script
originalRulerUnits = psApp.Preferences.RulerUnits
psApp.Preferences.RulerUnits = 1 # 1= psPixesl, 2 = inches

# Create a new 2x4 inch document and assign it to a variable.
docs = psApp.Documents
docRef = docs.Add(250,33)

# Create a new art layer containing text
layers = docRef.artLayers
artLayerRef = layers.add

artLayerRef.kind = 2 #Text layer
# Set the contents of the text layer.
textItemRef = artLayerRef.TextItem
textItemRef.Contents = "Hello, Web!"

# Restore unit setting
psApp.Preferences.RulerUnits = originalRulerUnits

2012-10-31

Sage on Ubuntu

This is a work in progress.  I have been using http://wiki.sagemath.org/SageServer and have got stuck with sage0 logins.  It is supposed to setup passwordless ssh keys but doesn’t seem to have worked.

2012-08-16

Resetting the Product key in Windows 8

I have a Microsoft MSDN Pro subscription that lets me try out software pretty much as it is released. Microsoft's MSDN website apppeared to be struggling yesterday with the delivery of Windows 8. I installed a new version and struggled with the conversion from Windows consumer preview to the Release To Manufacturing (RTM). In the progress the Windows activation didn't work and today I couldn't activate it.


A quick websearch got this website with the key command in it:



"For some users who're using Windows Vista Business Edition or other volume licensing (VL) editions meant for activation via KMS method, the system may erroneously search for KMS host for activation, even if the user uses MAK product key with less than 25 machines on the network. The solution to volume licensing customers for 0X8007232B is also the same - reenter the product key again, using step above, or alternatively, run the following commands in an elevated command prompt:


slmgr.vbs -ipk <Windows activation product key or MAK key>"



I used this and all was well with Windows 8. I didn't even need to activate it again.

2012-04-22

Gmail and the iPhone

I have a client who is having some trouble with the connection of Gmail and the iPhone.  They are reporting that by reading emails on the iPhone they are being deleted.  I have never noticed a problem for myself.

The variables

There are a number of things that can vary:

  • Subscription level Free (Google Apps) or paid for (Google Apps for Business) (The education  level
  • Imap or Pop 3 connectivity
  • Iphone setup as Gmail or Outlook
  • Transitioned account form single login
  • Enable SSL (enforce SSL for Gmail connections)

I have three Google accounts.  I logged into each one and copied the settings

  • A has no Google Apps, forwards a copy of each email to my hosted Outlook account.
  • B has the free Google Apps
  • C has paid for Google Apps for business. 

One thing that I was not clear on before is that you can log into your Google account but you need to seperately login to your Apps for Business account  (which you can get to by https://www.google.co.uk/a) (unless you click on a Manage Domain button in an email from Google).

Settings for account A:

image

Settings for accounts B and C:

image

2012-03-21

Creating a new GIT repository on Synology

These are the tasks I need to go through to create a new git repository on my Synology server.  I already have the Git server running and a putty client connection setup.

I login to the server using the root user. Go to the directory \volume1\git which was a share I had create earlier.

mkdir newproj

chown me:users newproj

cd newproj

git init –bare

chown –R me:users *

Then logging to new project directory on the development machine and right click and using TortoiseGit leaving the bare option unclicked.  You now have a local repository.  Now push it to the arbitrary URL using the master branch ssh://me@192.168.1.1/volume1/git/newproj

You will then be prompted for the password as the Putty key has not been set up.

2012-03-16

Configuring Django on Vagrant not including chef

In my last post the formatting was going odd so have started again.  My next job is to get Django installed on the UAT rather than a plain Ubuntu box.  You will see at the end I deferred using chef and just got the machine up and running.

I am going to try and follow Simon William’s post. I have a working server.  I also looked at this video. git was not installed on my base machine so I logged in and installed it, made a new directory and got my test software:

sudo apt-get install git
git clone
https://github.com/simeonwillbanks/vagrant-up-django-app-server.git

The syntax of the command in the Vagrant file had changed from

config.vm.forward_port “http”, 80, 8080

to

config.vm.forward_port 80, 8080

Then I needed to install chef which I hadn’t done. So trying the bootstrap knife on my local machine, and having the usual problem about verifying hosts:

C:\Users\me\chef-repo\.chef>knife bootstrap 192.168.1.7 –x me -P mypassword --sudo --no-host-key-verify

It didn’t work.  Unsure why I just installed directly on my base station using the apt-get process which worked fine and I tested it had worked with:

chef-client –-version

However I had forgotten the /etc/chef/validation.pem file which I moved with a fabric script:

def base_key():
    put(r'c:\chef\validation.pem','/home/me/validation.pem')
    run('sudo mv /home/me/validation.pem /etc/chef/validation.pem')




Then chef-client worked (don’t forget the sudo)




sudo chef-client




I had to reedit the Vagrantfile.  Vagrant up now nearly worked.  However I would get the message “The file /etc/chef/validation.pem does not contain a correctly formatted private key.”  It looked fine but I must have edited it with notepad as it had CR (Ctrl-M) at the end of each line.



Now it booted ok but it complained that it had already been registered (which it had in the last debug cycle).  At the end of the cycle I just destroyed the machine leaving the node registered on the chef server.  I need to bring the machine offline gracefully.



This command is still failing:




chef-client -c /etc/chef/client.rb -j /etc/chef/dna.json




One of my problems mois that I am building Ubuntu lucid boxes which have chef 0.09 and I am running it from a base build of Ubuntu Oneiric 11.10 with chef 0.10.  So I am going to use veewee to make a new base box.  I install veewee:




sudo gem install veewee




It didn’t go well veewee installation didn’t complete and it corrupted some gemspec files that I had to hand edit to fix.  I rebooted and my test vagrant box is working again.  I learnt one useful thing in that the Vagrantfile directory (on my base machine ~/uatbox32) is mounted as /vagrant in the vagrant virtual machine.



I mounted the VBoxGuestAdditions.iso in the client box and that eliminated one problem.  I still need to work on the chef upgrade from 0.09 to 0.10 which I did on the virtual box with:




sudo gem install chef




I hadn’t realised that chef had both clients and nodes and I needed to delete both from the chef server page after a vagrant up.  On a reboot the guest additions reverted – I should have done halt rather than destroy.  Luckily I had packaged the build so can use that as a base.



I am going back to Fabric for deployment.  A  historical chanes that might catch you out (it caught me out).  In 0.9 and later versions of fabric (I am using 1.4) Fabric uses the ‘env’ environment dictionary which used to be called config.  So any examples with config.x = are no obsolete.



I have found some nice guidance on django best practices:



http://lincolnloop.com/django-best-practices/projects.html



After a lot of mucking about I now have a working site.  The next stage is to simplify and to roll out for the dev,test,uat and prod environments.



dev is on my development machine and might do anything.



test is on production type hardware and is for testing.



uat is on production type harward and a recent backup of the production database for final acceptance.



prod is then the delivered product.

Long post now shorter

I had a long post about the tribulations of installing Ubuntu on a local server and then getting virtual box.  However a combination of Windows update and Windows live writer managed to edit it down to nothing so I am starting again.

Installing the OS, OpenSSH, virtual box and Vagrant

I used Ubuntu 32 bit 11.10 (as I needed RubyGems >= 1.3.6) to install virtual box and vagrant.  I should have selected OpenSSH as a default package (I selected nothing) so had to install that later:

sudo apt-get install openssh-server openssh-client

In order to login with out a username and password I wanted to used the SSH public key.  I modified the network interfaces to change the IP adresss and after a reboot changed the SSH control file to read the atuhorisation file.  Then added the authorisation key to the public key from that generated by Putty.  Note you have to edit the framework and end of lines, see here.

Another lifesaver which slowed me down all afternoon:

--disable-known-hosts stops Fabric from getting confused when you generate the same VM repeatedly”

Vagrant up for the first time

The aim here is to get the first box so that I can power it up and down – then aim to make that happen using fabric.  I thought I might have to this several times so firstly I decided to download the box to my local webserver from opscode and then install from there.

 vagrant box add lucid32 http://files.mysite.net/ubuntu10.04-gems.box

That turned out to be a good plan as the update then only took a few seconds. Then to start the machine and vagrant up:

mkdir devbox32
cd devbox32
vagrant init lucid32
vagrant up



The machine paused and after some messages I had a new machine in about 2min.



I can login to it either using putty from my machine or:




vagrant ssh




vagrant ssh from the host machine.  The username and password were vagrant.  Then I shut it down with:




vagrant halt

vagrant destroy -f




You don’t need the halt but it is a bit cleaner.  Next time you start up you don’t need to download the box.  The vagrant up command is now in fabric.  The complete code is in the appendix 1, here is the guts of it and the command lines:




def uat_up():

run('cd uatbox32 && vagrant up')




and the command line on my windows development box is :




fab --disable-known-hosts base uat_up




and I can login with Putty.



Appendix 1 Initial fabric file to do vagrant up remotely


Complete fabfile.py to get you started you will need to edit the me to your user:




import os.path

import subprocess



from  fabric.api import *

from fabric.contrib.console import confirm



# Constants

KEY_DIR = r'C:\Users\me\Library\keys'


PUTTY_DIR = r'C:\Program Files (x86)\PuTTY'



# These private python functions do not get exposed on the command line via the

# 'fab' tool. They will not show up when the user runs 'fab --list'


def _start_pageant_and_store_key(keyfile_name):


    """


    Starts the Pageant key agent, and loads the private key in to it, prompting


    for the passphrase if needed. Also sets the Fabric env.keyfile_name


    property.


    """


    keyfile_path = os.path.join(KEY_DIR, keyfile_name)



    # Start pageant. Note that this works with the PuTTY key format (*.ppk), not

    # the OpenSSH format.


    path_to_pageant = os.path.join(PUTTY_DIR, 'pageant.exe')


    result = subprocess.call([path_to_pageant, keyfile_path])


    if result > 0:


        raise OSError, "Bad result %s" % result



    # Store the path to the key file in fabric's global env dictionary

    env.key_filename = keyfile_path



def base():

    """


    Set up for connection to the base server for provisioning of


    """


    # Once DNS is set up for these hosts, I can use hostname instead of ip address


    env.user = 'me'


    env.hosts = ['me@10.0.0.7']


    _start_pageant_and_store_key('UAT_PrivateKey2.ppk')



def uat_up():

    run('cd uatbox32 && vagrant up')



def uat_destroy():

    run('cd uatbox32 && vagrant destroy -f')

2012-03-08

Installing chef on a TurnkeyLinux instance

I thought this would be easier than it turned out to be.  I needed to do a number of things :

  • install sudo eg  

apt-get install sudo

  • copied all the infstall files from my orignal instalataion eg knife.rb, Mame.pem, myOrg_validator.pem to /etc/chef
  • make sure directory is mapped

cd ~ | ln –s /etc/chef ./.chef

Then my command knife note create django00

knife node create django00

I started using the hosted chef model and after this I had a single node. Exciting stuff.  It would be nice project to get the bootstrap code to work for the TurnkeyLinux instance.

2012-03-06

Installing Dia python plug in on Windows 7 x64

I tried to run the intro tutorial for Dia but it didn’t work.  Assuming that this might be something do with the different directory structure I  tried putting my code here

C:\Program Files (x86)\Dia

which is not very nice but does work.

2012-03-02

SVN creating a new repository

Since I am now running my own SVN server there is only a slight cost in time to creating a new repository.  The top level directory in an SVN server is the repository and has to be created on the server rather than creating lower level directories which can be done by Tortoise SVN.  Getting round running at the adminstrator level is handy about svnSync and also about the SVN hosting services such as Codesion  and SlikSVN.

So on synology SVN host I logged in as root, there may be better ways of doing this but this worked for me.  Created my new site:

svnadmin create /volume1/svn/new_repository

This now inherits the wrong file permissions (root) so the directory listing looks like this:

image

so I moved to the directory and changed the owner and group:

cd /volume1/svn/new_repository
chown –R svnowner:users .

(don’t forget the trailing dot) and now it looks like this:

image

Next you need to add your username and password to the configuration file new_repository/conf/passwd (I am using vi for the editor) eg

image

Then in the same directory you need to change the following entries for the configuration file (svnserve.conf)

Make anonymous access have no access and authorised access write access:

image

Turn on using the local password database:

image

I also changed the realm to my URL but that is optional.

Now you can import your new directory using the method I talked about a while back.

2012-03-01

Configuring VOIP phone and PBX passwords

I have been using the voipfone service as a virtual PBX.  It is so far working well although I had not been using any of the VOIP features just the call diversion service.  I tried out RingCentral but didn’t like the fact that my calls appeared to come from the US.  I like the fact that you can easily apply the recording of calls to meet compliance.

I had a problem configuring my VOIP SPA941 phone yesterday as I had not realised that my voipfone account has a master password but each extension has its own password.  When setting the password you need to give the extension password.  Everything now works fine.

2012-02-29

Using Boto and Python to connect to a specific region

Here is my slightly inelegant but working code to connect to specific region without setting up a configuration file or altering the default in the library (the access keys you can find under the tab security credentials on :

aaaa = your AWS Access key
sssss = your Secret Amazon key

from boto.ec2.connection import EC2Connection
default_conn = EC2Connection('aaaaa','sssss')

regions = default_conn.get_all_regions()

for r in regions:
    print r.name
    if r.name == 'eu-west-1':
       conn = EC2Connection('aaaaa',’sssss',region =r)

print regions

rs = conn.get_all_security_groups()
print rs

2012-02-15

Installing Python Pyjamas and Pyjamas desktop for Windows 7

I am testing out python pyjamas as a gui front end which I can scale from a desktop app to web app to cloud deployable scalable app with very little change.  I have tried a number of different GUI stacks, the last was pytgtk which only worked with 32 bit Python which I had to install on top of my 64 bit python.  To start I have gone back to 64 bit python.

Going to the pyjamas wiki getting started  I started using the windows help.  I noticed it was a little out of date so decided to write my experience here.  I have already got a working version of Python 2.72 64 bit on Windows.

Next I installed tortoiseGIT as I have used TortoiseSVN a lot.  I also needed to install the Windows GIT client which I should have done first.  Then I create a pyjamas directory in my download directory and use right click Git clone to create the directory.

gitClone

You need to change the URL to git://pyjs.org/git/pyjamas.git and press OK.

gitCloneDialogBox

The first time I did it it failed so I deleted everything and tried again and this time it worked.

I then installed comtypes which was version 0.6.2.  I had two versions of Python installed so I selected Python 2.7.  It then had an error at then end:

ComtypesError


Carrying on, assuming that GTK may not be needed as Pyjamas desktop is using MSHTML and for my desktop I am at the moment only worried about desktop Windows apps. (I really don’t want to go back to Python 32bit again) I copied the pyjamas directory to my C drive so that I had the following directory C:\pyjamas\pyjd

I updated the system path  ControlPanel->System->Advanced system settings->(Advanced Tab)Environment Variables->Edit path  I added C:\python27;C:\pyjamas\bin. Note the pyjamas bin directory is added in the next step:

Open up a command window and then run which will create the bin directory:

cd \pyjamas
python bootstrap.py

I then created a build.bat in the helloworld directory:

pyjsbuild.bat --print-statements Hello

and also a run file:

pyjd Hello.py

Pyjamas works by combining files from the public directory eg files and template html and your code.  In order to use either the output or the desktop you must run the build process first.  Then you can use the run file first the app just opened up  in a new windowSmile and worked:

helloworld

If I opened the browser with output\hello.html I just got the static text but need to change to the output directory and run the html file (so the default location of other files works) then I get the application in a browser window.  I was using by default IE and didn’t work on getting the others to work.  This from start to end took me about 3 hours including writing my notes as I went.

2012-02-06

SVN sync

SVN has a very nice sync feature.  I have used at the end of a project to hand over by coping the version control information to a client repository.

I normally use TortoiseSVN and AnkhSVN to access the SVN repository but for this you you need an SVN client.  I used the the SlikSVN client with the typical configuration since they are selling hosting they are likely to make sure it works well (I used CVSDude way back now its unclear if it is called Codesion or Collabnet).  This has the svnsync command in it.

I got started with a post by Paul Querna.  Since I was doing it on a Windows machine and had a couple of problems I have written about my experience here.

Instead of defining environment variables I just created a number of batch files.   The first to make sure my SVN environment is working:

"C:\Program Files\SLIKSVN\bin\svn" --version

This command should return the version and a whole lot more info.  Then I tested access to the destination and source repositories eg:

"C:\Program Files\SLIKSVN\bin\svn" list https://myAcct.svn.cvsdude.com/myProj –username secretUser --password

secretPW

or

"C:\Program Files\SLIKSVN\bin\svn" list svn://192.168.0.0.1/myProj –-username secretUser -–password secretPW

This will return nothing for the destination repository as nothing in it and the  list of directories in the source repository.  If the hook properties need to be changed then the following code should be executed in the root directory of the source repository:

$ echo "#!/bin/sh" > hooks/pre-revprop-change

$ chmod 755 hooks/pre-revprop-change

Now you are ready to initialise syncserve:

"C:\Program Files\SLIKSVN\bin\svnsync" init svn://192.168.0.1/myProj --sync-username desSecretUser --sync-password destSecretPassword https://myAcct.svn.cvsdude.com/myProj --source-username sourceSecretUser --source-password sourceSecretPassword --non-interactive

You may get a warning about no supporting atomic revision and upgrading to 1.7.  For 1.6 this was fine.

svnsync: warning: W200007: Target server does not support atomic revision property edits; consider upgrading it to 1.7 or using an external locking program
Copied properties for revision 0
.

And now you should be ready to start the sync (just change init to sync):

"C:\Program Files\SLIKSVN\bin\svnsync" sync svn://192.168.0.1/myProj --sync-username desSecretUser --sync-password destSecretPassword https://myAcct.svn.cvsdude.com/myProj --source-username sourceSecretUser --source-password sourceSecretPassword --non-interactive

You will then get a list of changes copied over (the . after Transmitted file data refer to the amount of data transferred):

Copied properties for revision 9.

Transmitting file data …..

Commited revision 9.

2011-09-23

Useful commands

Getting the serial number of a PC from a Windows command prompt:

wmic bios get serialnumber

Thanks to here

2011-05-18

Well written Excel help

I thought this post on C Pearson was well written.  It explains name referencing in VBA.