960 Grid System

Very fast way to prototype websites and give them that Web 2.0 look and spacing.

Normal: http://960.gs/
Fluid: http://www.designinfluences.com/fluid960gs/12/

Some Rails Notes

.erb files

You can block HTML within ruby code.

<% 3.times do -%>
Ho!<br />
<% end %>
Merry Christmas!

Loop which in turn sets a variable:

<% 3.downto(1) do |count| -%>
<%= count %>…<br />
<% end %>
Lift off!

Escape HTML using h()

Email: <%= h(”Ann & Bill <frazers@isp.email>”) %>

Symbols and linking to Actions in Rails

Think of symbols in rails as “the thing named”.

So in a link for example <%= link_to “goodbye”, :action => “goodbye” %>

The thing named :action => “goodbye”

Looping through objects

<% for file in @files %>
file name is: <%= file %>
<% end %>

OR

<% @files.each do |file| %>
file name is: <%= file %>
<% end %>

Lots of Free Icons!

http://www.small-icons.com/packs/24×24-free-application-icons.htm

http://iconza.com/

http://speckyboy.com/2009/02/02/50-of-the-best-ever-web-development-design-and-application-icon-sets/

Great Photoshop Tutorial Website

Lots of amazing effects and abstract photoshop skills at PDSvault.

http://www.psdvault.com

Google User Experience Guidelines

http://www.google.com/corporate/ux.html

Performing Auto-Complete using Ruby on Rails 2.x

http://share-facts.blogspot.com/2009/02/autocompleter-example-in-ruby-on-rails.html

Remember HEADERS when sending mail from a site.

Generally speaking, the e-mail will go to junk because of incomplete and missing headers. Many spam filters pick these “lack of headers” as a commonality between all those e-mails for all those enlargement pills and pirated software we’ve all been after.

Your mail code is slightly incorrect though, generally speaking the usage for mail is:

mail(”To”,”Subject”,”Message”,”Headers”)

Which could explain why it went to junk the first time. Therefore you would have something like this established:

$headers = “MIME-Version: 1.0\r\n”;
$headers .= “Content-type: text/html; charset=iso-8859-1\r\n”; // Important to change if you ever add attachments
$headers .= “From: “.$email_address.”\r\n”;
$headers .= “Reply-To: “.$email_address.”\r\n”;
$headers .= “X-Mailer: PHP/”.phpversion().”\r\n”;

I’m sure you can work out the rest. Word of warning though, your e-mail address may be blacklisted as “junk” if you didn’t set the “from” value. There are many more headers that you may want to look up RFC2821 or some explanation on various headers.

CrossSlide – A jQuery plugin to create pan and cross-fade animations

http://www.gruppo4.com/~tobia/cross-slide.shtml

99 Designs – Start a competition, have people compete!

Great for getting logo designs etc.

http://www.99designs.com

Tutorials to read and learn

Coding Style – http://www.phpro.org/tutorials/PHP-Coding-Style.html

MVC – http://www.phpro.org/tutorials/Model-View-Controller-MVC.html

OOP – http://www.phpro.org/tutorials/Object-Oriented-Programming-with-PHP.html