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.
A blog about an eclectic mix including running Ruby, Python on Windows, Autoit, Tercero and Quantitative development with Mathematica. This is really to help me but I if it helps anyone else that is great.
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.
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:
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:
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
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:
Turn on using the local password database:
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.
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.
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
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.
You need to change the URL to git://pyjs.org/git/pyjamas.git and press OK.
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:
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 window
and worked:
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.
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.
Getting the serial number of a PC from a Windows command prompt:
wmic bios get serialnumber
Thanks to here