A collection of computer systems and programming tips that you may find useful.
Brought to you by Craic Computing LLC, a bioinformatics consulting company.

Friday, September 20, 2013

Stop e-mail spam from creating events in Google Calendar

An ever growing number of email spam messages will attempt to create events in your Google calendar. This doubles your spam experience - in your email and in your calendar - great...

The messages exploit the default settings in Google Calendar and fortunately this is easy to fix.

Open up your Google Calendar, click on the Setting icon in the top right of the panel (the Gear wheel icon) and then select 'Settings' from the menu that appears.

That gives you a long page of settings - look for this one, most of the way down:

Change the current setting to 'No, only show invitations to which I have responded' and Save your settings.

That should do it !

Why Google doesn't have this as the default I have no idea...

Thursday, September 5, 2013

Adding extensions to Postgresql database with Rails on Heroku

This is a follow up to my previous post Adding extensions to Postgresql database with Rails

If your database is running on Heroku you need to access it slightly differently.

Using the 'rails db' command does not work:
$ heroku run rails db
Running `rails db` attached to terminal... up, run.6499
Couldn't find database client: psql. Check your $PATH and try again.

Instead access psql like this and then add the extension. \dx lists the current installed extensions
$ heroku pg:psql
psql (9.2.1, server 9.1.9)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.
dftmhe7vpg4dhs=> create extension unaccent;
dftmhe7vpg4dhs=> \dx
                         List of installed extensions
   Name   | Version |   Schema   |                 Description
 plpgsql  | 1.0     | pg_catalog | PL/pgSQL procedural language
 unaccent | 1.0     | public     | text search dictionary that removes accents

Note that this works just fine with a pg:basic database plan. There is no need to upgrade just to use postgres text search.

Archive of Tips