Monday, 31 October 2011

Yahoo group spam: how to avoid it

I've been getting a lot of this spam lately. Generally by receiving a *genuine* notification of having been added to spammy yahoo group along the lines of:

From: kgsqdj Moderator 
Subject: Welcome to the kgsqdj group


I've added you to my kgsqdj group at Yahoo! Groups, a free,
easy-to-use service. Yahoo! Groups makes it easy to send and receive
group messages, coordinate events, share photos and files, and more.


I've been reporting them to spam-abuse as I go... but there is actually a solution to this (and don't hit the button at the bottom of the spam email).

You need to go to your yahoo groups prefs page: for each email address you have listed, clieck "edit" and untick the box marked "Allow group moderators to directly add me to their groups".

If you really want to be in control, also untick the box marked "Allow group moderators to invite me to their groups."

This way you'll only ever join groups that you actually apply to join.

Tuesday, 25 October 2011

( sad world (dead (John McCarthy)))

It's been a sad month for the computing world as we lose another great icon.

John McCarthy invented LISP and in doing was a pioneer of AI - contributing heavily to the field.

He will be greatly missed.

The register have written a better article on all his many contributions here: Father of Lisp and AI John McCarthy has died

If you're wondering how this relates to ruby - remember that ruby has been described as "an acceptable version of LISP"

Thursday, 20 October 2011

Does Linux Tech Support exist?

I recently had some trouble with my internet broadband connection. I changed to another provider while overseas, and when I got back, discovered that something I'd installed had broken my at-home internet setup... so I was bereft of teh intarwebs[1] for day while I figured it out.

As is usual in this kind of situation, I first tried getting it working by myself. I googled, read forums and generally faffed about installing and uninstalling various internet and USB-related packages in an effort to get things working...

but I'm not really a sysadmin, so you could probably describe my attempts as "well intentioned flailing"

I tried all the things that people said to try - but more in a voodoo/cargo-cult kinda way... because really I don't grok these packages intuitively and don't really want to spend the time learning. I just wanted to get it running again so I could get back to work.

So I eventually gave up, and rang tech support.

Or I should say I tried.

I googled about to find about 5 or 6 "linux tech support" companies in England. I checked out their websites and dropped a few off the list (for saying they only supported setting up LAMP stacks), and called the others. Two of these also said they only supported servers fairly quickly, and the third did so also - but only after they tried to tell me to go speak to vodafone or Mac (like either of them would support linux!).

and I was left with the strange sensation of being totally and utterly alone.

Back in Sydney I have ties with the linux community, and no doubt I could find half a dozen people willing to offer help for real cash money. I'm sure that figuring out a dodgy device-connection is not their usual bread-and-butter... but it's still linux support.

So, why, in this country of so many millions of people is there not a single company that does not provide this service?

Or if it does... it needs better SEO. :P

Does anybody know of a not-just-servers linux tech support company in England?

PS: in the end, a totally non-linux-sysadmin friend from Sydney suggested (via a facebook chat) that I reinstall network-manager, and as I did so I noticed there was a "recommended package" for it that was not installed... no idea which fixed it, but I owe that friend a big hug!

[1] I wouldn't normally do this, but:
Thank you Starbucks for being there when I needed you!
I think your coffee is way too milky, but when I needed some free wifi and a warm place to endlessly reboot after reinstalling package-after-package... you were there for me!

Friday, 14 October 2011

rubygems upgrade killed rails

Ack! I just tried to upgrade rubygems... and it destroyed my working version of rails 2.3.5 (yes, we use it for a client that has not yet upgraded due to the quite reasonable "it ain't broke" assumption).

Now I can't run script/server without one of the following errors: /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:268:in `==': undefined method `name' for "Ascii85":String (NoMethodError) or /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:in `requirement': undefined local variable or method `version_requirements' for # (NameError)

Chris Oliver provides a quick fix for getting back to a previously-working version in his description of the undefined local variable or method `version_requirements` and there's an active bug-report for the undefined method `name' for "Ascii85":String

For now, though, it looks like the only solution is to downgrade and hope for a fix... which seems to be coming only for edge rails. I really don't like it that I have to maintain and old version of rubygems just so that I can run my client's perfectly functional rails stack. :(

Friday, 7 October 2011

Jobs lost to the world

A moment of silence for the passing of Steve Jobs.


They always say of businessmen that "oh he was a visionary and great leader"... but Steve Jobs really was.

If you need a reminder of all the amazing things he did, there's a nice post outlining Mr Jobs' legacy on gizmag

The world is a little less bright without him.

Thursday, 6 October 2011

Rendering an rjs partial from a controller action

I've recently been working on sharing some AJAXy controller actions between an admin and non-admin controller set up in completely different parts of a site, and this required the ability to use shared rjs templates. Tis is what I found out.

Lets say you originally have an erb and rjs template thus:

   # original update_widget.rjs
   page.replace_html "widget_wrapper", :partial => "widget"

   # original widget.erb
   <div id="widget_wrapper">
      lots of cool stuff here to show off your widget

You need to pull that rjs out into a partial template called _update_widget.rjs as below.

Note the full path-name for the partial - this is so we can share this template across controllers

   # new update_widget.rjs
   page << render(:partial => 'widgets/update_widget')

   # new partial: _update_widget.rjs
   page.replace_html "widget_wrapper", :partial => "widgets/widget"

Now to call an rjs template from a controller action you use the syntax as below:

Note: this is what you put in the new controller, the original controller (in this case it'd be widgets_controller) will still default to using the action-name to find the rjs template

   return render( :partial => 'widgets/update_widget.rjs') # the '.rjs' is essential