RSS Feed
Nov 4

UPS Shipping Gem not working - Fixed

Posted on Sunday, November 4, 2007 in Programming, Ruby on Rails

Hello everyone,

I recently had the joy of working with the Ruby Shipping gem which allows you to grab shipping rates from UPS and FEDEX. However many people (myself included) have had problems with this gem. The reason is simple the documentation contains misinformation and is causing many developers to bang there heads. I found a solution and would like to share, so here it is.

OK first off make your life easier and create a file
/config/shipping.yml and add your ups account information as shown
below.

#in your config/shipping.yml file
ups_license_number: ups_xml_access_key
ups_user: ups_username
ups_password: ups_password

One important thing to notice is that I am using ups_license_number: as
opposed to ups_account: as shown in the Shipping gem docs :( . This is
what is causing all the trouble. Also note that I am using the xml
access key and not the account number.

Next you need a method to get your quote. Here is a quick one to get you
started.

#in your controller
def ups_quote(to_zip, sender_zip, weight)
  #define the parameters for the quote
  params ={
  :zip => to_zip,
  :sender_zip => sender_zip,
  :weight => weight,
  :prefs => "#{RAILS_ROOT}/config/shipping.yml"
  }
  #build the shipping gem object
  @shipping = Shipping::UPS.new params
end

#in your view

Shipping Quote: <%= number_to_currency @shipping.price %>
Oct 17

Call for help! Ruby - On - Rails Shipping Gem

Posted on Wednesday, October 17, 2007 in Do it yourself guides, Ruby on Rails

Hello everyone, I have been programming in Ruby using the Rails framework for a while now. However I have a situation where I am developing a shipping calculator for my applications using the Ruby “shipping gem”. The problem, at least I think, is the account number, username, password or all of the aforementioned attributes are incorrect. I have verified they are indeed correct and valid. I am getting an object returned to me in my code called the Shipping::ShippingError object. I am sure there is some kind of a message stored inside this object but I cannot access it because I think it is actually a Class. In short what I need to know is how do I, if at all extract the error from this Class? Object? so I can display it to the screen. Below is a code example.

The configuration file “shipping.yml”

#../../config/shipping.yml
ups_account: XXXXX
ups_user: XXXXX
ups_password: XXXXX

The Shipping Controller “app/controllers/shipping_controller.rb”

#app/controllers/shipping_controller.rb
class ShippingController < ApplicationController
   def quote
      params = {
                     :zip => 54494,
                     :state => “Wisconsin”,
                     :weight => 1,
                     :sender_zip => 68801,
                     :sender_state = “Nebraska”,
                     :prefs => “#{RAILS_ROOT}/config/shipping.yml” }

      @shipping = Shipping::UPS.new params
      @errors = Shipping::ShippingError
      #in the view we will show price like so @shipping.price
   end
end

The view file “shipping/quote.rhtml”

Test Shipping
This is a test of the UPS shipping code.
Output = [<%= @shipping.price %>]
Sep 16

Open for web development projects

Posted on Sunday, September 16, 2007 in About Tim Matheson

If you have a web development project relating to my work please contact me. I prefer to work with Ruby on Rails projects however I am additionally trained in PHP in a mySQL Apache environment.

Looking forward to working on your project.

Tim Matheson

Jun 15

Browse photos in a whole new way with Photosynth from Microsoft!

Posted on Friday, June 15, 2007 in Technology, Technology News

photosynth.jpg

Photosynth is an online pilot application for some new photo viewing technology from Microsoft Live Labs. Photosynth takes a collection of photos of a place or object and uses a computer algorithm to arrange the photos in the order they would appear in the real world. This creates a virtual 3d representation of the object or place in the photos. Currently Photosynth appears to be a test application providing several test collection of places. The project does not currently allow you to use your own photos. However it is a very nice little piece of software and I would encourage you to check it out.

Link to: Photosynth website

Jun 3

ff0000 Red Interactive - Hidden Character Codes

Posted on Sunday, June 3, 2007 in Do it yourself guides

ff0000.png

If you want to try a fun interactive chat visit Red Interactive. You can chat, and punch people, and even fly. This is a very fun site to visit. There are hidden characters in the site to. After some research I came up with all the codes which I am listing below.

Type any of the following codes into the chat message box exactly as shown on the left side of the equals sign below. Example if I want the camel I type “the last straw” exactly (without the quotes) into my message box and press enter ad my character will change. Have fun.

nay nay give me some hay = ed (Horse)

dead men tell no tales = nub (Pirate)

jiminy cricket! = hopper (Bug)

the last straw = cameljoe (Camel Man)

surley you jest = jester (Jester)

rumpelstiltskin is my name = unclesam (Uncle sam on stilts, he wont speak a word)

may i please have some blueberry pie? = gordon (Overweight man)

i shot a man in reno = jailbird (Bring back the convict, man with ball and chain)

i dreamt i was a butterfly = sun (Woman character that was removed, carries two fans)

May 29

My apologies for the absence in posts

Posted on Tuesday, May 29, 2007 in Ask Tim

Hi all, I would like o take a moment and apologize for the lack of content over the past few months. No I haven’t fallen off the face of the earth and no the blog is not dead so please stop sending me emails about that. I am currently working on developing several web applications using Ruby on Rails which I am just starting to fully understand. This has been consuming most of my time lately and for that I apologize. However I will be posting some more great, productivity packed content soon so hang in there.

Regards,

Tim Matheson

May 18

Learn Ruby on Rails and wonder how you ever got along without it

Posted on Friday, May 18, 2007 in Programming, Ruby on Rails

I have been learning Ruby on Rails for a while now and I must say it really is worth the hype. I would like to invite anyone who is interested in learning Ruby and the Rails framework to do so. You won’t be sorry. So what is Ruby on Rails? Well Ruby is an OOP (Object Oriented Programming) language and Rails is a web framework designed by a Danish programmer named David Heinemeier Hansson and 37signals an online web software company. Ruby is the code and Rails is the structure in which the code is organized, generated and maintained. If you have been programming in Java, PHP, ASP, ColdFusion or any other web programming language I would encourage you to checkout Ruby and its friend Rails and see what all the fuss is about. You can see the documentation for Ruby on Rails at http://corelib.rubyonrails.org I would also recommend a few books for beginners who are new to Ruby and or the Rails framework. Some books to get are Agile Web Development with Rails (Second Edition) from Pragmatic Bookshelf and also see Rails Recipes by Chad Fowler. Both books are easy to follow and walk you through the entire design/development process of creating a rails application. Some sites already using the Ruby on Rails framework are http://www.odeo.com, http://www.37signals.com, http://www.basecamphq.com, http://www.highrisehq.com, and many more. You can also download Ruby and the Rails framework by downloading the OCI (one click installer) found here at http://www.rubyonrails.org. If anyone out there has any additional tips for newbies to Ruby (myself included) please feel free to comment.

May 14

Time Savers from Getmoredone.com

Posted on Monday, May 14, 2007 in David Allen, Productivity, Quick Tips, Save Time

We all have done it, some maybe more than others. Regardless I have dug up an online resource with some great tips on how to get more done. The includes articles on “How To Stop Procrastinating“, “How To Prepare For Meetings“, “How To Delegate” and more. I found this resource very useful and hope you will to. Check it out at http://www.getmoredone.com.

Link

Apr 18

eHow to find water in an emergancy

Posted on Wednesday, April 18, 2007 in Do it yourself guides, MacGyver

How to Find Water in an Emergency
This eHow has instructions for finding water in an emergancy. Water being so valuable it’s good to know how to find it in an emergancy situation and might sav your life.
I don’t know about step four?

Drink from your toilet’s reservoir tank as a last resort (”but not from the bowl“).

Apr 14

HowTo: The easy way to install Ubuntu and Beryl Window Effects

Posted on Saturday, April 14, 2007 in Linux

I am in love with my new Ubuntu system thanks to Beryl and a few other great open source applications. In this quick HowTo guide I am going to show you how to get Beryl up and running on Ubuntu Linux without disturbing your Windows installation. A portion of this guide is borrowed from install.exe/Prototype article How to install Ubuntu without disturbing Windows. The article is already out there so no need in rewriting it. If you have already installed Ubuntu using this method you can skip over step one. I have not tested this on Kbuntu, and for the record I am running Linux ubuntu 2.6.20-12-generic with Feisty. Now onto the good stuff goto wiki.ubuntu.com and follow there manual, bookmark this page so you can quickly come back to it once you have your Ubuntu installation up and running. You probably won’t need the installtion guide at all because the installation is very intuitive but if you feel the need you can still give it a read.

Step 1.) Install Ubuntu using the Prototype installer.

Step 2.)Launch your Ubuntu installation and run a terminal window Application > Accessories > Terminal (The applications menu is located in the upper right hand corner of your Ubuntu desktop) now the terminal opens up and you now have a bash prompt in front of you. First we need to install Beryl-Core so we do the following commands.

sudo apt-get install beryl-core

Step 3.) Now you have the Beryl Core installed onto the next step. In the same terminal window or a new one (optional) type the following command.

sudo apt-get install beryl-manager

Step 4.) You now have Beryl-Manager installed on your machine and are ready to start using the cool effects. You can access Beryl-Manager from a terminal by typing the following command.

beryl-manager

You can additionally goto Applications > System Tools > Beryl Manager and select Beryl Settings Manager. This is the configuration of your super cool new desktop system Beryl. The rest of the process is a matter of personal preference. You can setup Beryl Effects anyway you please. You can speed up your system by turning off some effects such as blur, wobbly windows, and even 3D cube. There is really no major hardware required to do this. I didn’t have any trouble installing Beryl and am running a mere p4 HT 3ghz with 1.2 GB Ram and an onboard Intel GMA 900 video card. Not too shabby considering Windows Vista won’t even do the Aero Glass Theme without atleast a 3D accelerated card. Another reason why Linux is awesome.

Apr 12

Preventing Bad Grease Monkeys from changing your prices in eCommerce sites


Naughty Grease MonkiesI spoke with Gina Trapani on Wednesday about my concerns on this issue. The problem is that many online shops are using hidden fields in forms to pass information such as pricing, shipping, and quantity to their online checkout systems. Now I love Google Checkout for its sheer simple integration methods, but there is also an option to auto approve the payment and this concerns me. So I am writing to you today to illustrate some of the methods I have came up with which will hopefully prevent this sort of attack. Here are three ways you can circumvent this little flaw in many online stores.
(more…)

Apr 11

Multi Touch Sensor - Just plain cool

Posted on Wednesday, April 11, 2007 in Stuff I like

Apr 11

Video wallpaper on any version of Vista or XP with VLC Player

Posted on Wednesday, April 11, 2007 in Do it yourself guides, Windows Hacks

A lot of people are switching to Vista for it’s great features. One of the great features is DreamScene which allows you to play high-definition video as your desktop wallpaper. I am stuck with XP for the time being and won’t be switching to Vista anytime soon. So I began looking around on the internet for an alternative to using videos as wallpaper. I found a quick tutorial on Digg on how to do just that. The best part about this little trick is that it will work on Windows XP, Windows Vista Home, Windows Vista Home Premium, Windows Vista Business Edition and maybe even a few other operating systems. Now I could link to the article and probably should, but that would just cause you to have to reload your browser and it’s really quite simple. So what I am going to do is try to illustrate the basic concept of this trick and also link to the article because there is a more in depth explaination of how to get this up and running. I have mentioned VLC Player in the past and many of it’s great features, but if you haven’t already downloaded your free copy the url is http://www.videolan.org/vlc/. Now to do this all you need to do is install VLC Player, open a video file, and right click and check “wallpaper” and thats it. You now have a beautiful animated background using video from your most recent vacation trip, or maybe your favorite movie. It’s that simple.

Bonus Tip:
More than likely you will not want your video to play just once when you are using it for this purpose. So you will need to tell VLC to loop the video in the playlist interface found under navigation in the toolbar menu. Also you may wish to disable the sound so it doesn’t drive you crazy after playing 99 times over and over. To do this goto audio and select disable. Thats it, you now have the great feature of DreameScene on your non-DreamScene compatible operating system.

Read it on Digg

Apr 10

3D Desktop on Windows similar to XGL+Compiz

Posted on Tuesday, April 10, 2007 in Download of the day, Just for fun

Yod'm 3D

Linux offers some great stuff to the desktop user. Especially with new desktop environments like Dapper, Edgy and Breezy. However many people are still shackled to their Windows operating systems for various reasons. One of my favorite eye candy apps for Linux is XGL+Compiz which allows you to have multiple desktops mapped to a 3D cube which you can rotate in 3D space to find the desktop you want. XGL doesn’t stop there it also supports window wobble and other great visual effects but all that is another post. I wanted to find some software that could at least come close to XGL and was please to find Yod’m 3D. Yod’m 3D offers the virtual desktop system with all the desktops mapped to a 3D cube similar to XGL but with less features. You can easily rotate the cube horizontally not vertically as with XGL. Yod’m 3D is free and is a great application, so check it out.

Software summary:
The default shortcut keys (which are customizable) are Ctr+Alt [ARROW LEFT] or [ARROW RIGHT] to rotate the cube. You can also Ctrl+Alt and drag with the mouse to rotate the desktops around. There is a zoom feature and customizable background images also.

Link: http://chsalmon.club.fr/index.php?en/Download

Apr 10

Browsershots.org allows you to test your site in multiple browsers and operating systems

Posted on Tuesday, April 10, 2007 in Productivity, Save Time, Web Design Tools

Browsershots.org
browser-shots.gifIn the past I have mentioned Browsercam a ‘pay’ for service that allows you to test a site in multiple browsers / operating systems. While this is a great tool for professional web developers who don’t mind paying for every test. There is an alternative for freelance web developers and the weekend warrior. Browsershots.org is a FREE service that allows you to specify settings such as screen resolution, Flash media player, and more. Once you have chosen your configurations and submitted your sites url Browsershots.org will take screenshots of your site using multiple machines with the hardware/software configurations you specified. Browsershots.org does have it’s short comings. The preview is not generated instantly and is instead added to a queue to be processed in the order it was received. This creates a delay and you have to check back with the page, but it beats the hell out of calling everyone you know with a different type of system, browser, etc. to ask them to check out your site and send you a screenshot.

Link: Browsershots.org

Apr 10

Favorite picks for Open Source Applications

Posted on Tuesday, April 10, 2007 in Do it yourself guides

It’s no secret I love Open Source applications. Why? Well it’s really quite simple. When an application is Open Source you have much more control over how the application behaves and can easily customize it to your liking. Software that is not Open Source is similar to leasing a vehicle sure you own it, but you don’t have the right to fully pimp your ride. Below I have listed some of my favorite open source apps. Some are more promising than others and I am sure I have not covered all of the great open source apps out there. So to be fair if I missed any good ones please let me know in the comments.

  1. Firefox - Open source web browser with tons of great features, extensions, themes and more.
  2. Democracy Player - Open source media player that allows you to download torrents and play them in the same application. Democracy also supports a number of other great media formats.
  3. RSSOwl - A great little RSS reader.
  4. VLC - Handy video player that supports most video formats including Quicktime, AVI, DIVX, OGG, MPEG, VCD and etc.
  5. Audacity - Free audio editor packed with features. Enables copy and paste, audio filters and more.
  6. Notepad ++ Free full featured text editor. This one is great it supports syntax highlighting for 30 or so programming languages for all you programmers out there. Also see Scite (Ships with ROR) and Programmers Notepad.
  7. 7-Zip - Great little file archive tool that can open just about any archive file you through at it. Think of it as the swiss army knife of file archive utilities.
  8. Greasemonkey - Firefox Extension that allows you to execute your own Javascript files based on url locations. There are a lot of great Greasemonkey scripts already built that make this tool a must have for Firefox users.
Apr 8

Novell brings Linux to a “Commercial” level

Posted on Sunday, April 8, 2007 in Linux

Apr 7

Get creative with Linux via Ubuntu Studio

Posted on Saturday, April 7, 2007 in Top Downloads

Ubuntu Studio

Ubuntu Studio looks like a promising application to fill the gap in Linux that is creativity software. We all know Linux has sported The GIMP for sometime now which is OK for small stuff and definitely better than MS Paint by far. I can just imagine what this new software package will bring to the creative table for Linux. I am going to have to give this a run on Ubuntu. Check it out and let me know how it is in the comments.

Link: http://ubuntustudio.com/

Apr 7

Test your internet speed with Speed Test

Posted on Saturday, April 7, 2007 in Personal Posts, Stuff I like, Web Tools, Wireless Tips

Speed Test

SpeedTest.net is a cool way to test your internet connection speed online. Simply select a server to test and speed test does all the work in an awesome Flash based web application. Speed Test features a speedometer to show you the speed and is a very cool way to do an internet speed test. I highly recommend it, Speed Test is simple to use and just plain cool.

Link: http://www.speedtest.net

Apr 1

Painless XML sitemap generation tool


XML Siemap generator

Need an XML sitemap for your site but don’t want the hassel of doing it by hand? If so the XML Sitemap generator has got your back. The XML sitemap generator allows you to spider and create a sitemap for upto 500 pages and with their premium service you can create a sitemap for an unlimited number of pages. This is a really cool tool if you need to make a Google Sitemap for your site.

Link: http://www.xml-sitemaps.com/

price of zithromax buy accutane cheap order cialis from us cheap synthroid cheapest accutane cheapest lasix levitra for sale synthroid no prescription buy cialis generic cheapest levitra prices acomplia online buy cheap propecia order generic cialis cialis cheap price viagra cheap price cialis prices acomplia discount cialis no rx buy synthroid cheap cheap cialis on internet find no rx viagra order viagra from us lasix cheap cheap zithromax tablets soma cheap order cialis overnight delivery buy cialis online order zithromax online propecia online cheap cialis pharmacy cheap generic zithromax no rx cialis cheap cialis in uk purchase levitra cialis discount purchase propecia online discount acomplia cheapest accutane prices cialis bangkok viagra online pharmacy viagra pill best price for cialis cheap cialis no prescription online cialis purchase acomplia online buy zithromax online fda approved viagra compare cialis prices lasix without a prescription pharmacy viagra buying viagra online cheap cialis from uk clomid discount propecia online buy accutane without prescription cheap generic synthroid compare viagra prices cheapest lasix prices synthroid sale cheap cialis in canada viagra medication buy soma cheap viagra order no prescription cialis cheap cialis online synthroid pills soma online order viagra online viagra no online prescription online clomid acomplia without prescription buy cheap levitra online find discount cialis