Saturday, 26 March 2011

recovering sa password on MS SQL Server

Members of the Windows Administrators group now have access to SQL Server when SQL Server is in started in single-user mode, also known as "maintenance mode".

Simply restart the server in maintenance mode, edit sa's password, and then restart again in normal mode.

To start in maintenance mode, send the -m parameter when initializing the server:
  1. Open the Configuration Manager in SQL Server 2008/Configuration;
  2. Edit the properties of the server instance, adding -m to the Startup Parameters option (user ; to separate options, be careful not to add spaces)
  3. Restart the server

To change back to normal mode, remove the -m parameter and restart the server.

Via Raul Garcia.

Monday, 14 March 2011

testing ruby RegExps

There are several good tools to quickly edit regular expressions and check them against a test string.

I tried Rubular.
It worked perfectly, so I looked no further.

exposing localhost websites, MacOS

  • Open Sharing in System Preferences;
  • Select the Services tab;
  • Select Web Sharing — this will allow internal webpages to be accessed externally, as per the description of the setting;
  • See your address appear in that page, test it.

Simple!
And now I can use VMWare to test my rails app in IE (that wretched browser...) by just visiting http://10.1.1.9:3000.

Via MacInstruct.

Tuesday, 1 March 2011

add PostGIS functionality to a db

psql -d test_db -f /usr/local/Cellar/postgis/1.5.2/share/postgis/postgis.sql
psql -d test_db -f /usr/local/Cellar/postgis/1.5.2/share/postgis/spatial_ref_sys.sql