Archive for the ‘Tools’ Category

Monitoring VPN connection

Sunday, November 28th, 2010

Sometimes you really need to make sure VPN connection is alive when you are running some applications. I didn’t find any easy way to do this in Win7 (I don’t want to installing new firewalls just because of this) so I made this small application called “vpncheck 1.1″:

http://code.vn720.com/files/2011/07/vpncheck-2011-06-07.zip

Old “vpncheck 1.0″ is still available at http://code.vn720.com/files/2010/11/vpncheck-2010-27-11.zip

It does following:

Checks every 0.3s that VPN connection is active and kills listed processes if not.
If later VPN becomes active, the processes are re-started.

Reads config file (vpncheck.cfg) which has following format:
<name of VPN connection, e.g. Anonine>
<full absolute path filename of exe 1>
<full absolute path filename of exe 2>

Example of valid config file:
Anonine
C:\Program Files (x86)\uTorrent\uTorrent.exe
C:\Program Files (x86)\Skype\Phone\Skype.exe

Tested on Windows 7.

Provided as is, no guarantees of any kind.
This is a bit hacky application so don’t take it as example of good software engineering, but it should work.

Feedback, bugs, comments, welcome: jani@kajala.com

The application comes with full source code and build files (Visual Studio 2008) if you are interested to take a look. However, it does have executable as well.

Cheers,

Jani

Xampp and Skype using port 80 and 443

Monday, April 12th, 2010

Argh. I’ve had this problem at least twice already, but since it’s always so long interval between installing Skype on a new PC and Xampp I always forget this:

Skype uses ports 80 and 443 by default.

That’s why Xampp doesn’t work, Apache won’t start but there is no error message either. Hopefully I will remember this time…

Automatic website testing

Saturday, April 10th, 2010

When developing more complicated web services or add new features, there is always a risk that you break something when you make modifications. Solution: Design a set of tests to perform always when you make any changes, and design those so that you will catch all problems automatically.

Excellent automatic testing tool for testing functionality of a web site or services: Selenium IDE:

The functionality is simple: Selenium records actions done in Firefox (Selenium IDE is Firefox plugin), and you can play back the scripts later. You can also combine individual scripts to test suites.

There are plenty of other tools for automatic web testing as well, but I’m quite happy with this. Some small nags: Order of tests cannot be changed inside the suite in IDE, you have to do it by editing the script. Also, an annoyance is ‘click’ recording. It should almost always record as ‘clickAndWait’ and causes easily confusion since the test fails due to lack of waiting…

document workflow

Saturday, April 3rd, 2010

Wiki (more specifically pmwiki) is my new LaTeX. I used to write quite a bit documents with LaTeX but dumped it for several reasons:

  1. Install hassle. Always problem when you need to produce output in some random computer.
  2. Team work. When someone else needs to edit those document, good luck, since he probably has never used LaTeX.
  3. Small hacks. It’s convenient when producing final output to do some small tweaks to the document based on the output just before sending it. Those small tweaks are usually major pain in LaTeX unless you’re a full-time professional LaTeX user and not do much else. :P

However, problem with WYSIWYG editors such as Microsoft Office and Open Office is that the document quality deteriorates over time. Extra spaces, etc. inconsistencies just creep into the document. LaTeX didn’t have this issue. However, neither has wikis. So I ended up with this work-flow:

I write all my documents (at least 90% of them) in PmWiki, and then copy-paste the document to Open Office to make TOC, put some headers/footers etc. and produce final PDF output. Works really great and I still am able to keep the “source document” as plain text.

Presentation timer

Sunday, February 21st, 2010

Freeware (&ad-free) utility helps you to match PowerPoint etc. presentations to time limits by giving you various timing statistics: Elapsed time, remaining time, reference slide, remaining time on current slide. You can also save the page as is for offline use:

slide Timer

I checked a few other presentation timers out there before doing this tiny JavaScript app, but couldn’t find anything which would give the same (or more) timing statistics. Especially I wanted the reference slide number and the current slide timer.

Web Developer Firefox Add-On

Thursday, December 17th, 2009

Web developer is a nice Firefox add-on which can, for example, display information about web forms over the page. Very useful, for example, for writing bots. :P

PHP development tools and reference docs

Tuesday, December 8th, 2009

Recently a friend of mine asked which tools and docs I use regularly for web development. Here it goes:

Swebapps

Wednesday, October 28th, 2009

Swebapps concept: Drag-n-drop buttons, click click click and you get iPhone app. Maybe it’s useful for making a dedicated iPhone app for a restaurant, but it’s very limited what you can do with that approach. Calling the creations ‘applications’ is almost generous, since it’s more like ‘mobile optimized website generator’. They also reflect this view by speaking about hosting the application… Maybe it has some uses but don’t expect to make a blockbuster iPhone app with that approach. Their pricing also reflects this: You pay monthly hosting fee, 270 USD per year, but there is no royalty. Probably because you won’t get much either, at least by sales. But yep, maybe it’s a good solution for making dedicated iPhone app for your Backyard BBQ restaurant.

Visual Studio Key Bindings for Eclipse

Friday, October 2nd, 2009

Once again I installed Eclipse (PDT), and once again I didn’t find Visual Studio (6) style key bindings for Eclipse from anywhere. I’m sure there are multiple places to find those, but anyway I didn’t find one easily and since those are fast to add I added the ones I use myself.

So here is the CSV file exported from Eclipse: vc6-keys-for-EclipsePDT-20091117-1316.zip

The key bindings I added:

New PHP File: Ctrl+N
Next Editor: Ctrl+Tab
Previous Editor: Ctrl+Shift+Tab
Find and Replace: Ctrl+F
Find Next: F3
Find Previous: Shift+F3
Open Search Dialog: Ctrl+H
New File: Ctrl+N
Go to line: Ctrl+G

One shortcut I actually moved back to Visual Studio: File.Close = Ctrl+W

If you add more export CSV and send back to me jani (at) kajala dot com, I will update the file here as well.

The Eclipse which I used to export those was “Eclipse for PHP Developers. Build id 20090920-1017″, but I guess it should work on other Eclipses as well.

—–

Update (2009-10-16): Added Ctrl+G -> Go to line.
Update (2009-11-17): Fixed F3 search-next to work similar way in VS2008

Building regular expressions interactively

Friday, October 2nd, 2009

Regular expressions are handy tool in many programming languages (like PHP), and PERL compatible syntax is “fairly standard”, but building and debugging regular expressions is pain in the ass. So in that context, The Regex Coach is a great simple tool, it’s a free application which lets you experiment with regular expressions interactively. Nice.