Brasil

Arquivo | Posts

24 julho 2006 ~ 1 Comentário, deixe o seu »

Dunga na Seleção

- Boa tarde Senhor.
- Boa tarde, tudo bom?
- Tudo. Bem, você está interessado em trabalhar em nossa empresa, certo?
- Isso. Vi a oportunidade na internet e por isso estou aqui.
- Muito bem, qual a sua experiência como diretor na área de RH?
- Nenhuma, na verdade até hoje fui apenas funcionário. Nunca fui diretor.
- Ok, perfeito, [...]

Continue Reading

19 julho 2006 ~ 2 Comentários, deixe o seu »

CSS Browser Selector

Simple trick to help you on CSS hacks!
Official Page:
http://rafael.adm.br/css_browser_selector/
EXAMPLE
With this script you can set a different background color of one div for each browser.

Internet Explorer – yellow
Firefox – gray
Opera – green
Konqueror – blue
Safari – black

Source of this example:

<div class=”example”>

<style type=”text/css”>
.ie .example {
background-color: yellow
}
.gecko .example {
background-color: gray
}
.opera .example {
background-color: green
}
.konqueror [...]

Continue Reading

14 julho 2006 ~ Comentários desativados

Better gsub method for Prototype library.

Today I needed to use the method gsub implemented by the Prototype, the javascript library used by Rails. I perceived that it was a little different of ruby’s one.
The ruby method return a array if called without replacement string, but prototype’s doesn’t.
So, I wrote my own gsub method to be used with prototype that return [...]

Continue Reading

11 julho 2006 ~ Comentários desativados

Zidane

Impressionante como o cara conseguiu em um minuto arruinar uma carreira. Abaixo uma diversão para o pessoal:
http://www.corriere.it/Primo_Piano/Sport/2006/07_Luglio/10/pop_zidane.shtml
Não desista e veja o que acontece!

Continue Reading

02 julho 2006 ~ 5 Comentários, deixe o seu »

Simple tooltip helper for Ruby on Rails

A simple tooltip helper with span tag and title attrbute for Ruby on Rails framework.
app/helpers/application_helper.rb
def tooltip(content, options = {}, html_options = {}, *parameters_for_method_reference)
html_options[:title] = options[:tooltip]
html_options[:class] = html_options[:class] || ‘tooltip’
content_tag("span", content, html_options)
end
app/views/foo/bar.rhtml
< %= tooltip "Tags", { :tooltip => ’some keywords to categorize your data and help in future searches’ }, :class => ‘mytooltip’ %>
public/stylesheets/yourstyle.css
.mytooltip {
cursor: help;
color: [...]

Continue Reading