March 11th, 2008 by Giovanni
I use Subversion with Delphi and omitting various files type is a good idea (there’s no point in committing DCU files, backup files …).
You can do this by going to to TortoiseSVN/Settings in the right-click menu and giving a list of patterns for files you DON’T want included in the "Global Ignore Pattern":
Here’s my list (should be all on one line):
~*.doc #*.*# *.aux *.bak *.bbl *.bin *.blg *.cfg
*.dcu *.dll *.dof *.ddp *.drc *.dsk *.dsm *.dvi
*.err *.ess[Mm]odel *.exe *.idx *.ilg *.ind *.lo
*.lof *.log *.la *.lst *.map *.o *.obj *.old *.out
*.rej *.rsm *.suo *.sav [Tt]humbs.db *.tmp *.toc
*.tps *.~* *.*~ #*# .* .*~ *~. bin cvs CVS obj
The bin/cvs/CVS are directories, the rest files. Obviously there are ignored extensions for files other than those related to Delphi.
I put a text file containing this list in the repository, so it’s easy to have the same exclusions when setting up TortoiseSVN a new machine.
February 18th, 2008 by Giovanni
Wake on LAN mini HOWTO: Tools
or use the Linux command
etherwake -b mac-no-of-lan-interface-on-computer
February 18th, 2008 by Giovanni
Vi is one of the ordinal editors on Unix, and now Linux machines. It has a minimal interface but can be very fast and is great if you have a slow connection.
The Wikipedia article http://en.wikipedia.org/wiki/Ed_(text_editor)
has a very nice 10 line summary.
This note is primarily so I can remember where to find it again :-)
November 27th, 2007 by Giovanni
I’ve modified a Python program I found on the net to batch-convert a folder of images to PNG format and also create the bounding boxes needed by Latex – a text formatting system wonderful (once you get used to it) for large documents.
The original program JPG2PNG was from
http://www.akehrer.com/wiki/code:jpg2png
I’ve modified it to find and convert BMP & GIF images as well and so called it img2png.py
Put img2png.py in the folder full of images and run it. It will find all the JPG/BMP/GIF images and output PNG versions. I’ve tested the BMP/JPG parts, but not the GIF conversion, but (like all untested code) it should work :-)
The code should appear here but WordPress
chokes when I try to upload the Python code
so here's a download link ...
Download: img2png.py
This work is licenced under a Creative Commons Licence
Giovanni Moretti – 2007
summarised as: anything that may go wrong is not my fault!
July 1st, 2007 by Giovanni
I keep on creating regular expression that I think should go but don’t :-(
Here are a couple of pointers I’ve found useful:
#### Five Habits for Successful Regular Expressions ####
The article at – http://www.onlamp.com/lpt/a/4101 this shows how you can break up regular expressions over multiple lines and add comments to make things intelligible – at last. Regular expressions as usually written are horrible, all on one line and no explanation. Here is how to do something about it, in PHP (wonderful language), Perl …
####Using Regular Expressions in Microsoft Word####
Strange as it sounds, you can not only use wildcards in Microsoft Word, but also use the parts of the input text that matches a pattern as part of the replacement.
To do this:
* put parenthesis (brackets) around parts of the patterns,
* in the replacement string, use the markers \1 \2 .. \n – these correspond to the parenthesised parts of the input pattern. From memory this is actually in the help – been using Word for over fifteen years and didn’t know it was in there ….