Archive for April, 2011
shaping p2p traffic
by specialj on Apr.24, 2011, under Linux, Sysadmin
I’ve been doing more work with linux traffic control. I’m finding my earlier efforts are too complicated and end up introducing latency. My latest shaper is very simple. I decided I wanted to check in on the status of a couple of projects that can be used to classify p2p traffic.
- ipp2p – discontinued, recommends checking out opendpi: OpenDPI.org
- l7-filter – moved here: l7-filter | ClearFoundation
Though I’ve played with both of these in the past I’m not using either in production currently. Most p2p programs are well behaved enough to mark data transfers as bulk which makes shaping easy.
upgrade a rails app from rails 2 to rails 3
by specialj on Apr.24, 2011, under Ruby On Rails
Just a few notes on a recent upgrade with a rails project that was fairly young thus did not have a lot of issues moving to rails 3.
problems upgrading devise in an rails 2 to rails 3 migration
by specialj on Apr.22, 2011, under Ruby On Rails
I ran into some problems upgrading devise from 1.0.x to 1.3.x.
- to use passwords besides bcrypt you have to made 2 changes:
- in config/initializers/devise.rb
- config.encryptor = :sha1 (for devise 1.0.x compatibility)
- in User model (or whatever model calls devise)
- call devise with both :database_authenticatable and :encryptable
- you can tell you have issues with this if you see errors like BCrypt::Errors::InvalidHash or “invalid hash”
- in config/initializers/devise.rb
- browser validation prevents sign in with something other than email
- I create app/views/devise/sessions/new.html.erb from the devise version and changed email_field to text_field
- Can’t log in with “username” (some hidden JS blocking) – Devise | Google Groups
playing with ruby gui frameworks
by specialj on Apr.19, 2011, under Development
Trying to figure out how easy it is to use ruby to write a desktop application. It would be nice to have something cross-platform. At the moment I’m playing with qt4, gtk2, and wxwidgets.
Firefox seems to load content in noscript tags when javascript is enabled
by specialj on Apr.07, 2011, under Web Development
I can’t find any information about this, partially due to the badly named noscript extension, but it appears that firefox will load an image in a noscript block even when javascript is enabled. This is troubling for my use because I’ve put a static google map on an app for those that do not have javascript and wrapped it in a noscript to avoid loading it when it’s not needed. Now javascript users have to download the map twice, once static, once dynamic. Definitely a waste. Maybe this is fixed in firefox 4.
Some pc builds
by specialj on Apr.06, 2011, under Hardware
These are some numbers for the cpu/mb/ram/video assuming all else will be equal. The AMD Phenom II X4 945 is available again. It’s a great CPU that allows for ECC RAM, if one is willing to spend 2x as much for ECC RAM these days. Intel Sandy Bridge system will be much quicker, though I am considering waiting for Z68 motherboards to become available as that is only a month or so away.
fixing a bug in simple-rss
by specialj on Apr.05, 2011, under Development
Just walking through some bug fixing.
Comparing Piwik vs Open Web Analytics
by specialj on Apr.05, 2011, under Sysadmin
Just some notes. Of course one could use both.
Working with google maps, rails, jquery, microformats
by specialj on Apr.05, 2011, under Development
Lots’ of work moving to unobtrusive mapping using googe maps and jquery, storing location data as hcard microformat.
Need a new cell phone
by specialj on Apr.04, 2011, under Hardware
My phone is experiencing a lot of problems, most noticeably that call quality has been abysmal. So I’m looking at new phones and perhaps a new carrier / plan.