My two sheds // Personal take on tech

Coding

Pages (2): « [2]

March 2

Making your JavaScript XHTML-friendly

Filed under: Coding

Today I was revising some older javascripts to match my XHTML 1.1 code. In case you're not yet aware, JavaScript's document.write method is not allowed in well-formed XHTML pages - as described at W3C in XHTML FAQ:

Because of the way XML is defined, it is not possible to do tricks like this, where markup is generated by scripting while the parser is still parsing the markup.

However, document.write is used everywhere so if you still rely on some older non-XHTML-aware scripts I'll show you how to give your legacy code a DOM-facelift.

Read More. No comments made.

February 25

Useful Javascripts

Filed under: Coding

Today I embedded two Javascripts into my template and by pure coincidence both are Google-related.

Highlight incoming search queries

First is searchhi by The Daily Kryogenix. It's easy to install (just don't forget to modify your CSS) and works reliably.

N.B. Note however that apart from Google searches this script also recognizes Yahoo, AllTheWeb and any other search engine using appropriate query format.

Read More. No comments made.

February 4

Installing Ruby on Rails on Debian system

Filed under: Applications, Coding, Unix

Setting up Ruby and Rails

Installing required packages

First you'll have to get the required ruby packages:

          apt-get install libruby libruby1.8 ruby ruby1.8 libzlib-ruby1.8 libyaml-ruby1.8 rdoc1.8 libiconv-ruby1.8 irb1.8 libreadline-ruby1.8 libcurses-ruby1.8 libbigdecimal-ruby1.8 libdrb-ruby1.8 liberb-ruby1.8

        

Read More. No comments made.

January 25

Bookmarklet for 43things

Filed under: Coding, Web Services

I wrote a very simple piece of javascript for adding current selection to your list of goals on 43things.

You use it like this:

  1. drag this link to your bookmark bar (IE/Mozilla/Firefox/Safari etc): I want to...
  2. select some text on any webpage with your mouse
  3. click the link that you just dragged - and enjoy instant result!

NB: Make sure you're logged in to 43things before you attempt adding new goals.

Read More. No comments made.

Pages (2): « [2]

Subscribe to new entries