A Django site.
April 15, 2008

Von Fugal
no nic
ATOM von Fugal
» Bye Bye smbfs

Please, Von, please, next time you set up a samba mount, just use cifs and not smbfs. Save yourself a lot of headache.

0 comments

September 10, 2007

Von Fugal
no nic
ATOM von Fugal
» Network Manager

As I just said, I attended fozzmoo’s presentation at the UTOSC. I spent some time trying to get Network Manager installed and working on my laptop before hand, and about half way through the talk. Both fozzmoo and others in the room were very helpful in getting it up and running. Now it is and I must say, it’s pretty slick.

That said, I will tell you that Network Manager isn’t the end-all be-all of your networking experience. It is for a very specific niche, which is for ‘on the go networking’. If you don’t try to shoehorn it outside of this, you’ll have a great time with it.

I mention this because in the presentation several people asked about static ip’s and such. NM doesn’t do these well, nor do I think it really should. I admit though it irked me at first. My next tidbit of helpful information is what actually brought me around to this understanding of what NM is.

At the presentation there was some discussion about ubuntu and network manager. By myself, as you can imagine, as well as others. I poked around on my laptop, and figured out that an interface would only be managed in network manager if it was not in /etc/network/interfaces as well as finding that the normal ubuntu network configuration tool made changes to this file. This concerned me and I made it known to others, saying if you want NM you should go in and disable the interface in ubuntu’s config. That seemed kludgy to me.

Well, when I got home I fiddled with it some more. There I found that you don’t actually have to disable the interface, ubuntu’s config tool actually has an option in the interface properties to put an interface in ‘roaming’ mode. “Cool,” I thought. But more than cool, this is what made me realize the true nature of NM. So I configured some profiles in the network config as such:

  • Home: wireless in roaming, wired static on my home network (my laptop serves as gateway through the wireless)
  • Caradhras: wireless configured to caradhras (my router) if I’m ever again lucky enough to have my router serve as gateway.
  • Other: like it sounds, anywhere I don’t have a specific configuration. This one puts both interfaces in roaming mode.

It’s pretty sweet how they work together once you figure out the respective roles.

0 comments

August 10, 2007

Von Fugal
no nic
ATOM von Fugal
» Rails and SQLite3: Default Values

Here’s another rails fix. This one is for SQLite3 >= 3.3.8. SQLite decided to return sql strings for the default values shown in table definitions. This broke rails, the rails people got mad and won’t introduce a workaround. Well here’s my workaround.

sqlite_fix.rb:
module ActiveRecord
          module ConnectionAdapters
            class SQLiteAdapter < AbstractAdapter
              def columns table_name, name=nil
                table_structure(table_name).map do |field|
                  /^'?(.*)'?$/.match field['dflt_value']
                  field['dflt_value'] = $1
                  SQLiteColumn.new(field['name'], field['dflt_value'], field['type'], field['notnull'] == "0")
                end
              end
            end
          end
        end
Include it at the end of environment.rb. That’s it! 0 comments