Rails 3, ActionMailer, and Google Apps for Domains (1)

Recent entry May 8, 2012

After upgrading my Redmine installation to Redmine 2 (the development branch) emails stopped being delivered.

I send emails through Google Apps for Domains, so I had the following in my configuration.yml (previously email.yml):

delivery_method: :smtp
smtp_settings:
  address: smtp.gmail.com
  port: 587
  domain: substancelab.com
  authentication: login
  user_name: "foobar@example.net"
  password: passw0rd
  tls: true

I am pretty sure it used to work before the upgrade, now; not so much.

, Read the full entry , 1 comments

All lights are green (2)

Recent entry April 24, 2012

The following are quotes from an actual email conversation with a potential customer.

I’m no fan of bullshit NDAs, so I’m just sending this and I trust you that this’ll not end up on Twitter or anything

I know quality has its price. […] I don’t like the wheeling and dealing either. If you say it’s your rate, it’s your rate

We would certainly not be against contributing back to the [open source] community

I must close this deal.

, , 2 comments

CSS, links, gradients, rounded corners, and IE (3)

Recent entry April 13, 2012

On a project we were recently given a nicely designed button that we should implement.

Button using CSS rendered in Webkit

No problem, I thought, that’s doable using CSS3. Behold, it was (non-interesting styles like font color and size are removed for clarity):

HTML

<a class="button" href="#">
  Styled with CSS <small>(no extra markup)</small>
</a>

CSS

.button {
  background-color: #f98221;
  background: linear-gradient(top, #fec848, #f87d1a); /* Add vendor prefixes as needed */
  border-radius: 4px;
  border: 1px solid #eca253;
  box-shadow: rgba(0,0,0,0.2) 1px 2px 3px, inset rgba(255,255,255,0.7) 0 0 4px;
  display: inline-block;
  padding-left: 1em 36px 1em 18px;
  position: relative; /* Allows for absolute positioning relative to this element */
  text-decoration: none;
  text-shadow: rgba(0,0,0,0.3) 0.1em 0.1em 0.1em;
}
.button:before {
  background: url('icon_arrow_green.png') 50% 50% no-repeat;
  display: block;
  content: '';
  height: 100%;
  left: -2px;
  position: absolute;
  top: 0;
  width: 31px;
}

There was much rejoicing until the big blue elephant in the room reared its ugly head and pooped all over my nice and clean markup. Thank you, IE.

Button using CSS rendered in IE9

, , , , Read the full entry , 3 comments

Fact-checking the 40% (0)

Recent entry February 13, 2012

Last week I riffed on an infographic which erroneously claimed that Flash is “supported on 99% of web browsers”.

They compared that number to 40%, which is supposedly the amount of web browsers that “HTML5 is supported by”.

Oh really, now?

, , , Read the full entry , 0 comments

Flash is not the 99% (0)

Recent entry February 5, 2012

An “infographic” showing some data points in the epic HTML5 vs Flash battle has recently made its rounds on Twitter and other sites.

I don’t care much for whether Flash is the bees knees for games, but I do care about people misleading people with data. And some of the data points depicted in the graphic didn’t quite sit right with me, so here’s an attempt at figuring at least one of them out.

Flash is supported by 99% of web browsers

, , , Read the full entry , 0 comments

Ruby SSL certificate verification errors (0)

Recent entry January 2, 2012

On a client project, we had recently installed capistrano-campfire to get notifications in our Campfire chatroom whenever a deployment takes place.

Unfortunately I kept getting

SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)

when I tried deploying. There’s nothing quite like starting the year with SSL issues…

According to this article the problem

… comes from the fact that the new Ruby 1.9 installation doesn’t find the certification authority certificates (CA Certs) used to verify the authenticity of secured web servers.

I my case, I was using Ruby 1.8 (well, REE) on OS X Snow Leopard, but the problem - and solution - was the same nevertheless.

, , Read the full entry , 0 comments

Dear Open Source Software (0)

Recent entry December 18, 2011

Dear Open Source Software

I don’t think I have ever written you before, but there is something I wanted to get off my chest.

I just wanted to let you know, that you rock! Just the other day, you saved my customer a bunch of money - and made me look like a hero.

Okay, I realize you only did so because I had done part of the work already. And I am probably giving you credit for something you didn’t really do, but thanks to you a team of strangers had implemented features I needed and given them back to me.

Also, the way you enable people I have never heard about to take something I have created and transform into something they can use, is mind boggling.

Thanks.

Yours, Jakob

PS: I know, I know… I don’t contribute often enough, and I will some day, I promise. Soon.

, 0 comments

Challenge the deadline (4)

Recent entry November 30, 2011

There are basically two kinds of deadlines: Real, and Arbitrary.

Real deadlines are those necessitated by some external, unchangeable event. For example legislation, the company running out of money, the CEO having to get up in front of the world press and announce the product, or a marketing campaign kicking off.

, , Read the full entry , 4 comments

How to export CSV data from PostgreSQL (0)

Recent entry November 7, 2011

Just because I can never remember how to do this:

psql my_database -c "COPY (SELECT stuff FROM my_table) TO STDOUT CSV" > my_file.csv

Works in at least PostgreSQL 8.4.

, , 0 comments

Routing requests to local development environment (1)

Recent entry October 19, 2011

Some third party systems needs to send requests to your web application in order to work.

Facebook fetches the actual application, Chargify notifies you of subscription changes, payment gateways tell you the transaction has been accepted.

That’s fine in production where you have a public facing webserver running, but when you’re developing locally you have to jump through a few hoops.

, , Read the full entry , 1 comments

Archives
More entries in the archives »
What is this?
This is the virtual home of Jakob Skjerning, a system developer from Copenhagen, Denmark. Find out more...