RSS Feed
Nov 25

Send emails with ease, Rails Mailers Demystified

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

cheap cialis pill certified cialis cheap viagra in canada cialis buy drug buy generic cialis viagra buy 25mg viagra cheap viagra without prescription buy cheapest viagra on line purchase viagra cialis 10mg buying generic viagra cialis pills viagra from india cheapest sildenafil citrate cheap cialis no rx viagra india cialis bangkok viagra for order buy sildenafil internet buy generic viagra online buying cialis online where to order cialis tablet cialis find cialis no prescription required viagra cheap drug order cialis cheap online online pharmacy cialis cialis no rx order generic cialis price of cialis viagra soft drug viagra cheap viagra from uk order cialis no prescription order cheap viagra viagra drug order cheap cialis cheap cialis pharmacy best price for viagra cheap viagra from usa cost cialis cialis overnight shipping cheapest generic cialis online generic viagra online online viagra viagra sales cheap cialis in canada compare cialis prices online cialis online drug viagra online purchase discount cialis without prescription no rx viagra cialis overnight viagra uk cialis order cheap cialis from usa buying cialis cialis overnight delivery cialis in bangkok buy and purchase sildenafil online impotence treatment cheap price viagra viagra sale cheap cialis tablet drug cialis generic cialis online cheap viagra pharmacy find discount cialis online viagra malaysia cialis without a prescription buy cialis online cheap viagra rx buy no rx viagra cialis 20mg viagra in malaysia discount viagra online buy sildenafil cheap buy viagra low price buy cialis cialis cheap price cialis cheap generic viagra cialis canada low cost viagra buy cheap viagra cialis vs viagra order cialis from us cialis tablets find no rx cialis buy generic cialis online buy viagra overnight delivery cheapest cialis price buy cheapest cialis on line order cialis in canada viagra tablet viagra no online prescription find cheap cialis online viagra price order viagra no prescription cheap generic cialis buy viagra online cheap cialis uk cialis without rx generic cialis cheap viagra vs cialis order cialis on internet viagra tablets viagra purchase impotence drugs buy cialis generic cialis tablet cialis cheapest price order viagra from canada viagra generic cheap viagra from canada order cialis compare viagra prices online find cheap cialis impotence cure pfizer viagra find discount cialis cheapest cialis buy cialis from india impotence buy cheapest viagra online cialis side effects viagra order discount cialis online cialis in malaysia cialis in uk viagra in uk cialis online without prescription cialis online pharmacy order viagra buy viagra online viagra side effects cialis sale discount cialis no rx cheapest viagra find cialis order cialis no rx buy cialis low price buy viagra cheap drug cialis online purchase order discount viagra online 50 mg viagra 100 mg viagra 10mg cialis cost of cialis cheapest cialis prices buy discount viagra online cialis sales 50mg viagra cialis price buy viagra on internet cialis pill cheapest cialis online purchase viagra overnight delivery cheap cialis from canada cheapest viagra price cialis 20 mg buy sildenafil low cost order viagra without prescription buy viagra lowest price no prescription cialis order viagra on internet discount cialis overnight delivery cialis cheap drug viagra approved viagra no rx required compare viagra prices no rx cialis cheap cialis on internet buy viagra from india buy discount cialis online viagra pharmacy online order viagra from us cialis free delivery cialis for order buy cialis from canada viagra without rx viagra online review 10 mg cialis cheap viagra no rx cheapest viagra prices viagra prices cialis pharmacy order no rx cialis buy cialis in us buy cialis no prescription required order cialis from canada lowest price cialis cheap cialis internet online pharmacy viagra cheapest generic cialis generic drugs cialis india find cialis without prescription best price cialis buy viagra without prescription cheap cialis in uk where to buy viagra 20 mg cialis cheap cialis from uk buy sildenafil canada cialis no rx required cialis in us buy cialis overnight delivery cialis cheap price order cheap viagra online 20mg cialis buy cheap viagra online viagra internet viagra without prescription free cialis buy cialis us cialis buy buy viagra in canada order viagra cheap online find viagra without prescription viagra pills cheap cialis no prescription viagra online without prescription order generic viagra cialis discount viagra cheapest price purchase viagra no rx viagra no rx viagra cheap discount viagra overnight delivery sale cialis cialis pharmacy online purchase cialis without prescription pharmacy online cialis medication discount viagra buy cheap cialis impotence medication viagra medication find cialis on internet impotence pills cialis prices discount viagra without prescription cialis online cheap cialis online review find cheap viagra online buy viagra us purchase cialis online certified viagra where to order viagra buy cheapest viagra buy cialis internet order cialis online buy sildenafil online buy cialis cheap cheap viagra purchase cialis find discount viagra buy cialis on internet cialis buy online buy sildenafil online without a prescription viagra buy online order cheap cialis online viagra information no prescription viagra cost of viagra buy cialis in canada buy cialis online buy viagra cheapest generic viagra cialis us cialis australia fda approved cialis lowest price for viagra viagra bangkok cialis prescription cialis cost buy no rx cialis buy viagra internet viagra discount order viagra overnight delivery generic cialis viagra australia 25 mg viagra order viagra online viagra overnight cialis rx order cialis in us order viagra no rx order discount cialis online viagra vendors order viagra in us buy sildenafil in uk viagra us buy generic viagra viagra canada viagra no prescription viagra cheap price cheap viagra tablet viagra free delivery overnight viagra purchase viagra online find cheap viagra cialis malaysia best price viagra cialis free sample find viagra on internet cialis generic buy sildenafil in canada order cialis no prescription required cheapest viagra online purchase cialis no rx viagra in us order discount cialis cheap viagra internet free viagra cialis approved best price for cialis cialis from india find no rx viagra generic viagra viagra from canada viagra online pharmacy buy viagra from canada cheapest generic viagra online buy cheapest cialis discount cialis viagra overnight delivery cialis without prescription 100mg viagra cialis in australia price of viagra order cialis overnight delivery cheap viagra in uk buying generic cialis viagra pill buy cialis on line low cost cialis find discount viagra online buying viagra cheap cialis overnight delivery pharmacy cialis cheap viagra pill viagra prescription find viagra online buy cialis lowest price discount viagra no rx online cialis viagra free sample cheap viagra in usa find viagra cheap viagra online buy viagra no rx generic viagra cheap buy cialis without prescription buy viagra in us cheap viagra overnight delivery cheap cialis in usa cheap cialis online viagra order no rx viagra viagra soft tab find cialis online lowest price viagra cialis drug cialis vendors viagra online stores erectile dysfunction order viagra in canada buy viagra on line viagra overnight shipping viagra online cheap lowest price for cialis approved viagra pharmacy cialis 10 mg cialis no online prescription cialis purchase cialis from canada order cialis without prescription viagra for sale viagra in australia approved cialis pharmacy buy viagra generic buy sildenafil in spain find viagra no prescription required cialis no prescription buy viagra from us order viagra no prescription required cost viagra purchase viagra without prescription buy cialis no rx cialis cheap cialis internet tablet viagra cheap viagra on internet viagra cost pharmacy viagra cialis soft tab cialis information buy cheap cialis internet purchase cialis overnight delivery cheap cialis without prescription buy viagra no prescription required compare cialis prices buy cheap cialis online overnight cialis where to buy cialis cheap cialis buy cheap viagra internet buy discount cialis viagra buy drug cheap viagra no prescription buy sildenafil citrate buying viagra online buy discount viagra fda approved viagra cialis online stores cheap cialis tablets buy cheapest cialis online cheap viagra tablets order discount viagra sale viagra viagra online cialis for sale cialis soft viagra pharmacy buy cialis from us viagra without a prescription viagra in bangkok

Ruby on Rails Mailers

Setting up a mailer in Rails can seem like a daunting task, especially to new comers. I found this video and several other resources online to be very helpful in explaining the ins and outs of setting one up. This is a very in depth video explaining how mailers can make life easier for the Ruby programmer. See the screencast!

[via : http://media.railscasts.com/]

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 %>
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.

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…)

Jul 13

Access your webserver with PuTTY

Posted on Thursday, July 13, 2006 in PHP, Productivity, Top Downloads, Web Tools

PuTTY is a free implementation of Telnet and SSH for Win32 and Unix platforms, along with an xterm terminal emulator. It is written and maintained primarily by Simon Tatham.

I use putty alot and really find it usefull. Download PuTTY here

–Tim Matheson

Feb 11

Introduction to PHP - Mini tutorial on the basics of PHP

Posted on Saturday, February 11, 2006 in PHP

PHP Hypertext Preprocessor is an advanced scripting language that is very usefull for web developers. I am some what new to the PHP syntax but I will try to write some helpfull tutorials on it as I learn.

Ok, Let’s get started …

PHP is used in conjunction to HTML or XHTML and other flavors of hyper-text-markup languages. PHP enables static html web pages to contain dynamic content and preform many usefull functions when it comes to user interactivity. For a full resource guide on PHP please visit PHP Resources for a more indepth look at PHP syntax and functions. The most common reason to use PHP in your web pages is the ability to interact with databases such as SQL.

SQL is beyond the scope of this post however I plan to add another section to cover SQL in the near future.

Anyone who has ever programmed anything is probably familiar with the “Hello World” program. It is usually the first thing you learn to do when learning a new language. So here is how to write a simple “Hello World” program using PHP.

To initiate a PHP script you first tell the browser that you are using PHP with the PHP script open command < ?php will tell the browser that any code after the and the parser will stop parsing the code as PHP and render the rest of the document as standard HTML.

Hello World

< ?php

echo “Hello World”;

?>

In the above script we used the PHP begin tag < ?php the echo command and the php close tag ?> .

The echo command will echo the data between the quotes to the screen.

Strings - php like many other scripting languages offers the ability to store information in a string. A string is simply some unique name begining with the $ by placing a $ before the string name it tells php to create a string using the name following the $ . To define a string you would simply write.

< ?php

$mystring = “Hello World”;

?>

Ok so lets take a look at what has been done here. We simply made a string called mystring and gave it a value of Hello World then we terminated using the ever so familiar ;

Now that we have a variable defined let’s use it to run a script.

< ?php

$mystring = “Hello World”;

echo = $mystring ;

?>

The above script would return Hello World to the screen where ever you place the code.

Pretty basic so far right. Ok so what if you have more than one string and you would like to echo them both to the screen using one echo statement. You would do in programming what is called concate the two strings using the . to concate the two strings. Example

< ?php

$firstname = “Tim”;

$lastname = “Matheson”

echo $firstname . $lastname;

?>

The above script would return Tim Matheson to the screen at the location of the script within the document. Now moving forward say we want to echo a string and some text at the same time. Simple just use the ” ” and the . to seperate each piece of information. Example

< ?php

$firstname = “Tim”;

$lastname = “Matheson”;

echo “Hello” . $firstname . ” ” . $lastname . ” ” . “, welcome to my PHP mini tutorial.”;

?>

Lets take our echo statement and break it down first echo tells php to put the contents to the screen. Anything in quotes will be displayed as text so dont quote your strings or you will get plain text output to the screen. (i.e. echo “$firstname” ; returns $firstname but echo $firstname; would return Tim) Ok moving forward the period’s seperate strings and text and are required for the script to work. The period will concate two strings or two pieces of text together. However to concate two pieces of text together would be a bit redundant. (i.e. echo “Hello” . “World” ;) would work but could be stated as echo “Hello World”; and save some kilobytes in the file size. Remember the larger the file the longer the parse time and the longer the delay from server to client. There for save yourself the agony of long parse times and also write clean code and only use whats needed.

Well that about wraps it up for this tutorial next time I will get into $_POST['string']; and $_GET['string']; and how to use them in conjunction to a form.

I hope you enjoyed this tutorial and found it usefull. If so please provide a link to my site so that others can find it usefull also.

Happy Coding Cheers!