Here are some resources to start with:
- Squeak by example (a free book introducing Smalltalk/Squeak)
- The Seaside homepage
- Seaside Tutorial (by the Hasso Plattner Institute)
- Lukas Renggli's Website (one of the core developers of seaside)
I'm a software developer who has been doing professional web application development with Ruby on Rails and Java. On this blog you'll find various postings about solutions I've figured out and things I've learned through my daily programming, but also various thoughts on software development in general.
# open up Vpim's DirectoryInfo::Field class
module Vpim
class DirectoryInfo
class Field
class << self
alias_method :orig_create, :create
# we overwrite Field.create for setting the CHARSET
def create(name, value='', params={})
# specify the lines you don't want to add a charset to
lines_to_ignore = %w(BEGIN END VERSION)
params.merge!({'CHARSET' => 'ISO-8859-1'}) unless lines_to_ignore.include? name
orig_create(name, value, params)
end
end
end
end
end
gem install syntax
require 'rubygems'
require 'syntax/convertors/html'
#create a new ruby2Html-converter and convert clipboard-content to html
converter = Syntax::Convertors::HTML.for_syntax "ruby"
html_code = converter.convert(IO.popen('pbpaste', 'r+').read, false)
#wrap the code in a pre-tag with class 'ruby'
html_code = ["<pre class='ruby'>", html_code, "</pre>"].join
#output the generated html-code to the console
puts html_code
#write the html_code back to the clipboard
IO.popen('pbcopy', 'r+').puts html_code
pre {
background-color: #f1f1f3;
color: #112;
padding: 10px;
font-size: 1.1em;
overflow: auto;
margin: 4px 0px;
width: 95%;
}
/* Syntax highlighting */
.ruby .normal {}
.ruby .comment { color: #6a6969; font-style: italic; }
.ruby .keyword { color: #7f2a53; font-weight: bold; }
.ruby .method { color: #077; }
.ruby .class { color: #683c2b; font-weight: bold;}
.ruby .module { color: #050; }
.ruby .punct { color: #000; font-weight: bold; }
.ruby .symbol { color: #000; }
.ruby .string { color: #2a9a67; background: #e8f5f5; }
.ruby .char { color: #F07; }
.ruby .ident { color: #004; }
.ruby .constant { color: #07F; }
.ruby .regex { color: #B66; background: #FEF; }
.ruby .number { color: #F99; }
.ruby .attribute { color: #7BB; }
.ruby .global { color: #7FB; }
.ruby .expr { color: #227; }
.ruby .escape { color: #277; }