eclipse-tutorial: Project Home Page
Eclipse Tutorial
developerWorks : Open source : Technical library
Tech Tidbits - Ruby, Ruby On Rails, Merb, .Net, Javascript, jQuery, Ajax, CSS...and other random bits and pieces.
Tuesday, June 12, 2007
Friday, June 8, 2007
APT Quick Reference
I found this handy apt-get Phil's APT Quick Reference...
Download and install package:
Update apt's list of available packages:
Upgrade all installed packages with upgrades available:
Upgrade to new distro, or in general upgrade anything available for update including core system packages:
Uninstall package:
Uninstall package, and its config files, and don't leave it in the database as 'uninstalled':
Search for a package like pattern:
Get information on installed package:
Find which installed package file belongs to:
List which files are in package:
Find out what packages provide file:
Run a command (such as ./configure or make) and have all necessary packages installed as needed:
Unless specified, the package in reference doesn't have to be already installed for these to work... but the database needs to be updated. You can update the appropriate database via:
or
or
Download and install package:
apt-get install package
Update apt's list of available packages:
apt-get update
Upgrade all installed packages with upgrades available:
apt-get upgrade
Upgrade to new distro, or in general upgrade anything available for update including core system packages:
apt-get dist-upgrade
Uninstall package:
apt-get remove package
Uninstall package, and its config files, and don't leave it in the database as 'uninstalled':
apt-get --purge remove package
Search for a package like pattern:
apt-cache search pattern
Get information on installed package:
dpkg -s package
Find which installed package file belongs to:
dpkg -S inetd.conf
List which files are in package:
apt-file list package
Find out what packages provide file:
apt-file search file
Run a command (such as ./configure or make) and have all necessary packages installed as needed:
auto-apt run command
Unless specified, the package in reference doesn't have to be already installed for these to work... but the database needs to be updated. You can update the appropriate database via:
apt-get update
or
auto-apt update
or
apt-file update
Ruby on Rails/Mongrel/Ubuntu
I've been using Ubuntu lately and decided to install Ruby on Rails and Mongrel.
Or download the source for the latest version (apt-get installs 1.8.4, but the latest source is 1.8.6):
Once ruby is installed, I typically use Gems if I can.
Download the latest Gems at http://rubyforge.org/frs/?group_id=126 (0.9.4 in this case) and then:
Install Rails:
Install Mongrel and Mongrel cluster gem plugin:
Install Apache 2.2
I got this error when running configure:
Adding this option fixed the problem:
Running Apache with a single Mongrel Instance
Add to apache conf (httpd.connf)
Restart Apache and it will forward requests for www.hostname.com on port 80 to Mongrel server running on port 8000.
$ sudo apt-get install ruby irb rdoc
Or download the source for the latest version (apt-get installs 1.8.4, but the latest source is 1.8.6):
$ tar zxvf ruby-1.8.6.tar.gz
$ cd ruby-1.8.6
$ ./configure
$ make
$ sudo make install
Once ruby is installed, I typically use Gems if I can.
Download the latest Gems at http://rubyforge.org/frs/?group_id=126 (0.9.4 in this case) and then:
$ tar xzvf rubygems-0.9.4.tgz
$ cd rubygems-0.9.4
$ sudo ruby setup.rb
Install Rails:
sudo gem install rails --include-dependencies
Install Mongrel and Mongrel cluster gem plugin:
sudo gem install mongrel --include-dependencies
sudo gem install mongrel_cluster
Install Apache 2.2
$ tar zxvf httpd-2.2.4.tar.gz
$ cd httpd-2.2.4
$ ./configure \
--prefix=/usr/local/apache \
--enable-rewrite \
--enable-headers \
--enable-ssl \
--enable-proxy \
--with-mpm=prefork
$ make
$ sudo make install
I got this error when running configure:
Configuring Apache Portable Runtime Utility library...
checking for APR-util... yes
configure: error: Cannot use an external APR-util with the bundled APR
make: *** [apache] Error 1
Adding this option fixed the problem:
--with-included-apr
Running Apache with a single Mongrel Instance
$ mongrel_rails start -p 8000 -e production -d
Add to apache conf (httpd.connf)
ServerName hostname.com
ServerAlias www.hostname.com
ProxyPass / http://www.hostname.com:8000/
ProxyPassReverse / http://www.hostname.com:8000/
ProxyPreserveHost on
Restart Apache and it will forward requests for www.hostname.com on port 80 to Mongrel server running on port 8000.
Thursday, June 7, 2007
Javascript/Ajax Libraries
I've been working on a few Ajax and DOM scripting projects at work using prototype.js and scriptaculous. Now we're looking at a "Web 2.0" upgrade for some of our sites, so I'm looking at several libraries:
Prototype JavaScript Framework
script.aculo.us
The Dojo Toolkit
Rico
Yahoo! UI Library (YUI)
mootools framework
MochiKit
JQuery
There are many, many more...
OSA Foundation - Survey of Ajax/JavaScript Libraries
Here's an accoridion demo I created with Rico:
My Rico Accordion Demo
Prototype JavaScript Framework
script.aculo.us
The Dojo Toolkit
Rico
Yahoo! UI Library (YUI)
mootools framework
MochiKit
JQuery
There are many, many more...
OSA Foundation - Survey of Ajax/JavaScript Libraries
Here's an accoridion demo I created with Rico:
My Rico Accordion Demo
Monday, June 4, 2007
DocBook
I've been tackling some documentation at work and decided to take a look at docbook.
There are a few good resources to start with:
With DocBook, you can use SGML (Dsssl styesheets) or XML (XSL stylesheets). I've chosen to work with XML. "DocBook XSL" provides the details of all the tools that are needed. At the moment I'm working on a Mac laptop, using the following:
I installed everything in my home directory and worked from there, but LSB proposal is:
Create a DocBook XML file (book.xml, for example)
Procss to generate html:
You can validate XML using xmllint (parser won't necessarily do it).
No output will be seen unless there is an error.
I haven't covered other formats (like converting to pdf using FOP), Java parsers, catalogs, makefiles, and Ant.
Speaking of Ant, here's a resource for DocBook and Ant:
DocBook and Ant.
I've already started looking at using Cocoon with DocBook, but that will be material for another post...
There are a few good resources to start with:
- DocBook.org the home of "DocBook: The Definitive Guide" by Norman Walsh and Leonard Muellner (published by O'Reilly & Associates, Inc.), the official documentation for DocBook.
- "DocBook XSL: The Complete Guide" by Bob Stayton.
- Single-Source Publishing with DocBook XML by Dan York.
With DocBook, you can use SGML (Dsssl styesheets) or XML (XSL stylesheets). I've chosen to work with XML. "DocBook XSL" provides the details of all the tools that are needed. At the moment I'm working on a Mac laptop, using the following:
- DocBook DTD: The DTDs can be found at http://www.oasis-open.org/docbook/xml/. I downloaded
version 4.5 (docbook-xml-4.5.zip). - DocBook XSL Stylesheets: The XSL stylesheets can be downloaded from http://sourceforge.net/project/showfiles.php?group_id=21935. I downloaded docbook-xsl 1.72.0.
- XSL processor: xsltproc (already installed on my system). There are a few others as well (Saxon, Xalan).
I installed everything in my home directory and worked from there, but LSB proposal is:
- DTD: /usr/share/sgml/docbook/xml-dtd-4.5
- XSL: /usr/share/sgml/docbook/docbook-xsl-1.72.0/
Create a DocBook XML file (book.xml, for example)
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5/EN"
"/path/to/dtd/docbook-xml-4.5/docbookx.dtd">
<book>
<bookinfo>
<title>My Book Title</title>
</bookinfo>
<chapter>
<title>Chapter Name</title>
<para>Some text</para>
</chapter>
</book>
Procss to generate html:
$ xsltproc --output book.html /path/to/docbook-xsl-1.72.0/html/docbook.xsl book.xml
You can validate XML using xmllint (parser won't necessarily do it).
$ xmllint --noout book.xml
No output will be seen unless there is an error.
I haven't covered other formats (like converting to pdf using FOP), Java parsers, catalogs, makefiles, and Ant.
Speaking of Ant, here's a resource for DocBook and Ant:
DocBook and Ant.
I've already started looking at using Cocoon with DocBook, but that will be material for another post...
WebSphere Application Server V6.1 on Linux
I recently downloaded the full-featured trial download of WebSphere Application Server V6.1 to my old Fedora Core 5 laptop.
The installation was amazingly easy...
After starting WebSphere, you can check out the sample application:
The installation was amazingly easy...
$ tar zxvf websphere.tar.gz
$ cd WAS/install
$ java -jar WAS/setup.jar
$ cd /opt/IBM/WebSphere/AppServer/bin
$ ./startServer server1
After starting WebSphere, you can check out the sample application:
http://localhost:9080/WSsamples
Subscribe to:
Posts (Atom)
About Me
- Doug Sparling
- Developer (Ruby on Rails, iOS), musician/composer, Buddhist, HSP, Vegan, Aspie.
Labels
- .NET (8)
- accordion (1)
- ActiveRecord (1)
- ajax (2)
- APT (1)
- apt-get (1)
- ASP (1)
- ASP.NET .NET (5)
- Audio (1)
- aws (1)
- Bash (1)
- bdd (1)
- C# (1)
- cache_fu (1)
- caching (1)
- DocBook (1)
- DOM (1)
- Eclipse (1)
- Excel (1)
- Firefox (1)
- gem (5)
- Gems (5)
- git (1)
- GridView (2)
- Hibernate (1)
- iBATIS (1)
- Java (9)
- javascript (9)
- javascript css (1)
- jQuery (4)
- jsspec (1)
- mdb2 (2)
- Merb (2)
- mongrel (2)
- mp3 (2)
- Music (2)
- MySQL (2)
- nginx (1)
- openssl (1)
- osx (3)
- pdocast (1)
- pear (2)
- Perl (7)
- php (5)
- plugin (2)
- podcast (1)
- prototype (1)
- REST (1)
- RMagick MacOSX (1)
- rspec (1)
- ruby (14)
- ruby on rails (21)
- RubyGems Merb (1)
- s3 (1)
- screencasts (1)
- scriptaculous (1)
- scriptrunner ruby rails erlang (1)
- Sortable (1)
- subversion (1)
- testing (1)
- testing erlang tsung (1)
- tomcat (1)
- ubuntu (2)
- WebSphere (1)
- will_paginate (1)