Codeistry

Posts Tagged ‘offtopic’

MySQL Workbench 5.1.10 beta

Friday, April 10th, 2009

The new MySQL Workbench is now in beta and is looking very good:

MySQL Workbench 5.1.10 showing a MODx 0.9.6.3 databaseYou can import create scripts (mysqldumps), build diagrams yourself, with full drag and drop etc, and export create scripts. You can also annotate with text and images and export the diagrams as SVG, PDF, PNG etc… Here’s the PDF for the MODx 0.9.6.3 diagram shown, along with the MWB (workbench) file. That diagram is just an imported mysqldump of a MODx DB – all I did was click the auto-arrange button.

It’s available for Linux (32 & 64 bit), Mac and Windows. I’ve been playing with the 64bit version in Ubuntu and it seems to work great! More info on their blog, or get it here: http://dev.mysql.com/downloads/workbench/5.1.html

gcalc: a command line version of Google Calculator

Friday, April 10th, 2009

Here’s a command line version of Google Calculator:gcalc command line tool in use

Download gcalc here: http://www.codeistry.com/assets/files/gcalc.zip

Using Google Calculator in firefox's search box.It’s a little python script that talks to Google, using it’s calculator syntax. You’ll get the same answers if you type the queries into google

To use the script, just download the zip file, extract the file inside and put it somewhere on your path; I’ve started putting these kind of things in ~/bin. I originally found the script here (http://vrai.net/page.php?block=scripts) but it didn’t work too well, so I fixed it up. I’ve tested it on Linux, but it should work anywhere Python is installed.

If you’re using that script on Linux, then chmod +x gcalc it to allow it to be executed. If you’re using Windows, you might have to add ‘.py’ to the end of the filename. Then the syntax is very simple:

gcalc “1 hour 5 minutes in seconds”
1 hour 5 minutes = 3900 seconds

gcalc “100 + 2 * 5″
100 + (2 * 5) = 110

gcalc “41000 yen in british pounds”
41,000 Japanese yen = 277.129372 British pounds

Here are complete instructions on the syntax that Google Calculator supports.

Also, in the screenshot above I’m using Fish, the Friendly Interactive SHell because it does nice syntax highlighting, amongst many other cool things. Fish is here, if you want it.

Have fun!

Codeistry blog is proudly powered by WordPress Entries (RSS) and Comments (RSS).