Stupid Windows Firewall

So it turns out that Windows Firewall, even in Windows 2008, still can’t accept a range of ports, either in the UI or via command line, most commonly when setting up PASV FTP transfers. The common workaround is to create one entry per port in your range like so: C:> FOR /L %I IN (60000,1,60200) DO netsh firewall add portopening TCP %I "Passive FTP"%I While this does work, it’s slightly annoying that you have to create 200 individual entries in your config. My slightly better workaround is to just stick every port into the text entry field using this simple ruby helper: ...

January 30, 2011 · 1 min · chetan

Launching srchmvn.com

Today I’m launching my latest personal project, srchmvn.com, to help Java developers find Maven artifacts. It’s also the first project I’ve finished* and released in a very long time. The Problem While Maven is, at it’s core, a build system, one of the most valuable features it offers is it’s centralized repository and transitive dependency management for your projects. You can simply include an artifact definition and Maven will, at build time, download and provide not only the selected artifact, but all it’s dependencies as well. ...

March 31, 2010 · 3 min · chetan

Using MySQL with JRuby

For some reason, I had a relatively hard time finding this info all in one spot, so here it is: Using MySQL with JRuby is actually pretty easy (and no annoying arch issues on OS X! :-) Install GEMs (DBI, JDBC driver, DBI adapter): $ jgem install dbi jdbc-mysql dbd-jdbc Then use it! require 'dbi' require 'jdbc/mysql' dbh = DBI.connect('dbi:jdbc:mysql://localhost:3306/test', 'root', '', { "driver" => "com.mysql.jdbc.Driver" } )

February 24, 2010 · 1 min · chetan