Limi's Sphere of Influence

dabbling, frivolling, idling, loafing, loitering, playing and procrastinating

Archive for November, 2008

Had to go look this up today as we are using more named_scopes at work now, although couldn’t off the top of my head remember how to get a named_scope to take an argument nicely. Anyway, the solution is…

named_scope :recent, lambda { |*args| {:conditions => ["created_at >= ?", (args.first || 10.minutes.ago)] } }

Hopefully this helps someone out

  • 0 Comments
  • Filed under: Programming, Rails, Ruby
  • Getting VOIP phones working through a SpeedTouch 780 can be somewhat… frustrating. They seem to have a talent for wanting the NAT config option enabled, then decided that it doesn’t want it enabled at a random interval. The easiest fix is just to toggle the NAT options on and off in your phone configuration.

    However, if this fails to work it might be that your SpeedTouch has some SIP options enabled and is technically blocking your phone from being able to receive data from your phone provider.

    We have found 2 fixes, and if one doesn’t work, the other should, but we’ll apply both just to make sure. So let’s start off shall we!

    Connect to your SpeedTouch over Telnet and type the following…

    :connection unbind application=SIP port=5060
    :saveall

    connection
    appconfig application=SIP SIP_ALG=disabled
    :saveall

    After you’ve done that, if the phone isn’t already working, give it a quick reboot and try again. If it’s still not working, toggle the NAT options to whatever they aren’t already on and try then.

    Hopefully this gets someone else’s VOIP phone working correctly, as it seems to be one of the most annoying fixes I’ve had to do to get them working again.

    This is the easiest way to get RMagick installed in Ubuntu Intrepid Ibex for Ruby….

    sudo apt-get install libmagick++9-dev

    …then…

    sudo gem install rmagick

    Job done!

    If you had a previous installation of Aptana Studio in hardy and now that you’ve upgraded to ibex it no longer works then you aren’t alone. It no longer works since during the upgrade Firefox 2 was removed from your system, and there isn’t a way to put it back in as its been removed from the package manager.

    Luckily the fix is easy…

    sudo apt-get install xulrunner

    Then you’ll need to either edit or create a startup script for Aptana to use. So make a file called “runAptana.sh” in /usr/local/aptana and inside that put…

    #!/bin/bash
    export MOZILLA_FIVE_HOME=/usr/lib/xulrunner
    /usr/local/aptana/AptanaStudio

    Then, whenever you want to run Aptana use that script instead; otherwise you’ll get those nasty errors which hamper your daily work efforts!

    Links


    Sponsored Links


    Archives


    Last Played Music


    Warning: gzinflate() [function.gzinflate]: data error in D:\sites\b\blogs.gerbilsofwar.com\htdocs\limi\wp-includes\http.php on line 1787

    Meta