I recently went back through my backups recently and found quite a few old abandoned projects. Looking back on the code I see some things I'm impressed with, but the majority of the code I wouldn't write today. That's not to say the code is bad, or doesn't function. It did exactly what I wanted to accomplish at the time, just not necessarily in the most efficient way.
A good friend of mine recently left the organization I work for and the task of resetting our passwords and auditing credentials fell on me. Since we use Heroku for our development platform I needed to not only reset the credentials for the web portion (which conveniently also handles resetting the API key) but also revoke any SSH keys he may have added to access it.
This is going to be a real quick post. I'm using the
carrier_wave gem with
fog for one of my projects and found that when a file is stored on S3 the
filename methods return nil. I got around this issue in two
separate ways neither of which I'm particularly happy about.
Jeremy Spilman recently proposed changes to how user's hashes are stored in website's and companies databases. This post was originally going to look at some of the issues involved in the scheme he envisioned, however, he rather quickly posted a followup article with a well thought out solution that countered all of the issues that other people and myself were able to come up with. I'd strongly recommend reading both if you haven't done so. Instead of announcing flaws, I'm turning this into a post with a simple functional implementation of the described scheme in Ruby using DataMapper.
So I recently encountered a situation where I needed to define a prefix on the tables used by the "data_mapper" gem. When I went searching I found quite a bit of information about similar projects in Python, and PHP named DataMapper but nothing about the ruby "data_mapper". The search continued eventually ending in my reading through the source of the data_mapper gem only to find that there was no feature for simply defining a prefix.