Git: Untracked working tree file would be overwritten by merge

I ran into a merge conflict when a branch had changed a file and I was merging in another branch where the file had been deleted and placed in gitignore.   Some suggestions on handling this here: fetch – Force git to overwrite local files on pull. – Stack Overflow I used: git checkout <your-branch> -f I …

Continue reading ‘Git: Untracked working tree file would be overwritten by merge’ »

Accessing MS SQL Server from Rails without ODBC

I found myself looking through the code for activerecord-sqlserver-adapter and noticed a new mode called “dblib”.  It turns out this mode can be used when using the tiny_tds gem along with FreeTDS to avoid using ODBC altogether.  I decided to try it out on a project and have found it to work very well so far.  The …

Continue reading ‘Accessing MS SQL Server from Rails without ODBC’ »

Ruby regexp surprise: w is not equivalent to [0-9A-Za-z_]

Despite ample documentation to the contrary I was surprised to learn that by default ruby matches w to all unicode characters.  This lead to some strange results in one of my apps where unicode quotes were present and matching w.  I found the solution is to use /w+/n to specify the n kcode rather than …

Continue reading ‘Ruby regexp surprise: w is not equivalent to [0-9A-Za-z_]’ »

Resetting postfixadmin password

I had a client using postfixadmin but no one knew the password.  Simple enough to go into the db to reset: dovecotpw -s MD5-CRYPT -p password | sed ‘s/{MD5-CRYPT}//’ Then in the database: update admin set password=’CRYPTED PASSWORD” where username=’USERNAME’; I found how to do this here: SourceForge.net: Postfix Admin: Topic: Postfixadmin mysql password storage …

Continue reading ‘Resetting postfixadmin password’ »

Will I end up having to write my own Linux twitter client?

I am not at all happy with the state of GNU/Linux twitter clients.  It seems this is all too common in the open source world, too many people working on different products, none of which end up being very good.  I’ve counted 10 native GNU/Linux clients (not counting Adobe Air) and not one of them …

Continue reading ‘Will I end up having to write my own Linux twitter client?’ »

Working with devise for Rails authentication

I’ve begun using devise for authentication for my various Ruby on Rails applications.  It is based on warden which seems a sensible choice.  There is also a fairly large community and active development.  Devise plays nice with authorization libraries such as CanCan and can be integrated with OmniAuth for oauth/oauth2 authentication.  I’ve run into a …

Continue reading ‘Working with devise for Rails authentication’ »