Back In 2003, Ctd
8 minutes ago
ZoomIt is screen zoom and annotation tool for technical presentations that include application demonstrations. ZoomIt runs unobtrusively in the tray and activates with customizable hotkeys to zoom in on an area of the screen, move around while zoomed, and draw on the zoomed image. I wrote ZoomIt to fit my specific needs and use it in all my presentations.
hours = dict([(hour, display(hour)) for hour in range(24)])
for hour in sorted(hours):
text = hours[hour]
print "" % locals()
def display(hour):
if hour == 0:
return 'midnight'
if hour == 12:
return 'noon'
ampm = hour > 12 and 'PM' or 'AM'
return '%d %s' % (hour % 12, ampm)
hours = (0..23).inject({}) do |hash, value|
hash[value] = display(value)
hash
end
hours_sorted = hours.keys.sort_by {|k| k}.map {|k| [k, hours[k]]}
hours_sorted.each do |k, v|
print "\n"
end
hours = (0..23).inject([]) do |list, value|
list.push([value, display(value)])
list
end
hours.each do |k, v|
print "\n"
end
#!/bin/bash
#
# install_rails_stuff
function install_readline
{
pushd /usr/local/src
if [ ! -f readline-5.1.tar.gz ] ; then
curl -O ftp://ftp.gnu.org/gnu/readline/readline-5.1.tar.gz
fi
if [ -d readline-5.1 ] ; then
rm -fr readline-5.1
fi
tar xzvf readline-5.1.tar.gz
pushd readline-5.1
./configure --prefix=/usr/local
make
sudo make install
popd
}
function install_ruby
{
pushd /usr/local/src
if [ ! -f ruby-1.8.6.tar.gz ] ; then
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.gz
fi
if [ -d ruby-1.8.6 ] ; then
rm -fr ruby-1.8.6
fi
tar xzvf ruby-1.8.6.tar.gz
pushd ruby-1.8.6
./configure --prefix=/usr/local --enable-pthread --with-readline-dir=/usr/local --enable-shared
make
sudo make install
sudo make install-doc
popd
}
function install_sqlite3
{
pushd /usr/local/src
if [ ! -f sqlite-amalgamation-3.6.16.tar.gz ] ; then
curl -O http://www.sqlite.org/sqlite-amalgamation-3.6.16.tar.gz
fi
if [ -d sqlite-3.6.16 ] ; then
rm -fr sqlite-3.6.16
fi
tar -zxvf sqlite-amalgamation-3.6.16.tar.gz
pushd sqlite-3.6.16
./configure --prefix=/usr/local
make
sudo make install
popd
}
function install_rubygems
{
pushd /usr/local/src
if [ ! -f rubygems-1.3.4.tgz ] ; then
curl -O http://files.rubyforge.mmmultiworks.com/rubygems/rubygems-1.3.4.tgz
fi
if [ -d rubygems-1.3.4 ] ; then
rm -fr rubygems-1.3.4
fi
tar xzvf rubygems-1.3.4.tgz
pushd rubygems-1.3.4
sudo /usr/local/bin/ruby setup.rb
popd
}
function install_rails
{
sudo gem install rails --include-dependencies
}
function install_mongrel
{
sudo gem install mongrel --include-dependencies
}
function install_capistrano
{
sudo gem install capistrano --include-dependencies
}
function install_termios
{
sudo gem install termios --include-dependencies
}
install_readline
install_ruby
install_rubygems
install_rails
install_mongrel
install_capistrano
install_termios
install_sqlite3
]]></b:skin>
pre {
overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not needed in Firefox 3 */
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
/* width: 99%; */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
background-image: url(magnifier.png);
background-image: url(http://alexgorbatchev.com/pub/sh/current/styles/magnifier.png);
<script language='javascript' src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js'/>
<script language='javascript' src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js'/>
<script language='javascript' src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushGroovy.js'/>
<script language='javascript' src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js'/>
<script language='javascript' src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPlain.js'/>
<script language='javascript' src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js'/>
<script language='javascript' src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushRuby.js'/>
<script language='javascript' src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js'/>
<script language='javascript' src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js'/>
<script type='text/javascript'>
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.config.gutter = true;
SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf';
SyntaxHighlighter.all();
</script>
.world
{
font-weight: bold;
}
def hello()
{
println "hello world"
}
function hello()
{
alert('hello');
}
hello world
def hello:
print 'hello'
def hello
print 'hello'
end
// Oracle
select 'hello world' from dual;
// SQL Server
select 'hello world'
<say>
hello world
</say>