Archive for the ‘Programming’ Category

ArEncrypt Update

ArEncrypt just got infinitely more useful, which isn’t saying a lot since it didn’t do much to begin with.

http://github.com/KellyMahan/ArEncrypt

The updates add some features for active record searches for encrypted data and comparisons to encrypted values. Before it did only one thing and thats encrpyt a value for the db. Comparisons and searches had to done manually. Now they are just as easy to use as regular active record queries.

New Plugin for Rails: ArEncrypt

I added a new plugin to my repository on github today.

http://github.com/KellyMahan/ArEncrypt

I just kept running into this same issue every time I needed password encryption. And I didn’t know of any other plugins that accomplished the same thing with such simplicity.

Just install the plugin and in your active record class

encrypt :encrypted_attribute_name

It’s just that simple. On every before save the attribute you named will be encrypted. If the value isn’t changed before a save the the encryption is skipped.

Doing some Android development.

I picked up the wrox book on android development from Amazon. Don’t really like Java, but I love the android phones. Give me some ideas on a good app to develope.

I’ve got some google wave invites.

First few people to register and post a comment about how you know about my blog gets it.

Upadate: Ok making it more difficult now, You must have me as a contact in at least 2 other sources. Twitter, Facebook, IM, RL(Real Life) etc..

Some new changes to memcachedb_q

I added some new functionality to the memcachedb_q plugin to allow for repeatable calls.

q = MemcachedbQ.new(:email)
q.add_runner(:mail, :get_emails, :repeats=>30, :repeat_name=>”email”)

This repeats the Mail.get_emails call every 30 seconds. Using the repeat name makes sure that there is only 1 repeating call with the same name. The repeats work by adding a new item to the queue with a future run date just before the existing one fires off and is removed. The future date is based on the :run_time value plus the repeat value in seconds. If a run_time value is not provided the first repeat sets it’s on run_time value based off Time.now.

Also if you add a runner with a run time date in the past, it will only add a runner in the future for the next time it would have matched :run_time + repeat*x. That way if the scheduler ever dies or is shut down, it won’t have a huge list of runners to go through before it catches up to real time.

De-forking a github project.

Yesterday I decided to de-fork my memcachedb-client library from the memcache-client project. The directions that they needed to go were getting too far apart to continue to incorporate changes. It turns out github doesn’t have a way to defork a project. But it still is an easy process.

First thing to do is make sure you have the latest pull from your fork. Then log into github and rename your project. I just add -old to the end. Next create a new project with the original name and then copy the permissions from the old repository if there are any. Do a standard push from your source ( there was no need for me to change anything before hand ) and your repository is now fork free.

It seems like it would be very easy for github to accomplish this on their end, so I’m not sure why they don’t do this. I bet using the github api a gem could be made that would do this for you, that is if someone wanted to spend the time to do this *hint*.

Shampoo.com Launched Today

Shampoo.com

Shampoo.com

Today we launched shampoo.com

I mostly worked on the back end of things, including a lot of plugin work that we used. It’s been a challenging and fun project to work on.

And if you are looking for some specialized shampoo or other hair styling products then shampoo.com is the place to go.

Live feed from WordCamp Dallas

The live streams are over but you can still watch what went on below.

Some ruby coding.

Ruby and Rails
Creative Commons License photo credit: Berberich

When I started working for Digimedia we decided that a lot of our projects were going to be done in rails. I had never used ruby at that point and rails and frameworks in general were just starting to gain popularity. So I was a bit skeptical about the benifits of learning a new language all over again. At that point the majority of web coding was done in php or asp and I had many years of experience in both.

Well I’m glad that I did learn ruby and the rails framework. Things that would take a while coding in php and asp, I could knock out in minutes in rails. Not only that but I really do prefer the syntax of ruby now. I still use php for a lot of simple things, but if it will need a database, rails is where I look first.

I’ve even gotten as far as writing some of my own plugins, and forking some others to add more functionality. The open source environment with ruby is outstanding.

Return top