Web

Replace specific HTML tags using sed and regular expression

In this post I would like to replace all <embed> HTML tags in a HTML file with a <strong> tag. # sed -e ‘s/<embed[^>]*>/<strong>/g’ filename.html > newfile.html And if you would like to remove the <embed> tag altogether # sed -e ‘s/<embed[^>]*>//g’ filename.html > newfile.html To remove all HTML tags in a file # sed […]

Read More
Web

Valid Flash

I’ve gotten tired of my Flashpresentation movies not being valid HTML. After some research and a tip from a friend of mine I found this solution to the problem. <object type=”application/x-shockwave-flash” data=”images/banner.swf” width=”288″ height=”128″> <param name=”movie” value=”images/banner.swf” /> <img src=”banner.gif” width=”288″ height=”128″ alt=”banner” /> </object> It works great and shows a image file if Flash […]

Read More
Linux

Create a year calendar for 2008 using pcal

I wanted to make a whole year calendar and found pcal, a command line tool. pcal -F 1 -E -B -O -p -w -o 2008.ps 2008 -F starting weekday; 1 is Monday -E specifies European formatted dates -B leave unused date boxes blank, default is grey -O selected days will be printed as outlined characters […]

Read More
Web

Premailer: preflight for HTML e-mail

Premailer is a script accessible from the web that turns external CSS webpage into inline, improving the rendering of HTML e-mail. This makes it possible to make a webpage and then run it througt this script to make a HTML e-mail.

Read More
Web

Left and Right align text on the same line

It can sometimes be useful to have some text be aligned to the left and some text be aligned to the right on the same line, eg in a footer. Here is how this can be done in HTML: <div id=”footer”> <p class=”leftalign”>Text on the left.</p> <p class=”rightalign”>Text on the right.</p> </div> If you were […]

Read More