Inheritance
2007-06-29 by xpheas
Fundamental OOP principle:
“Inheritance is a great way of ensuring that the bad decisions you make at the start of a project stay with you forever.”
http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming
“Inheritance is a great way of ensuring that the bad decisions you make at the start of a project stay with you forever.”
http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming
IE on Ubuntu (Feisty)
2007-06-21 by xpheas
OK, you may wonder why i do something stupid like this,
but i'am working on an new web project and i also want support the ie users...
I was looking for a way to use the ie under Linux and found a package called IEs4Linux
that provides an easy way to install 3 IE versions on Linux.
Here is a little tutorial how to install the IE on Ubuntu Feisty.
OK, first a note:
IEs4Linux is under GPL but IE is not, so you must have a legal Windows copy otherwise installing IE is illegal!
Legal notices
Here we go.
First we have to install wine (skip this step if you already have wine)
Edit the sources.list and add the repositories.
Use your prefered editor to do this. (nano, vi, gedit...)
Add the repositories:
Refresh the package list and install wine
---
Installing IEs4Linux
Install IEs4Linux, do this as normal user!
After a while the installation will finish an you can use your IEs:
from shell:
There also should be some nice icons on your Desktop.
but i'am working on an new web project and i also want support the ie users...
I was looking for a way to use the ie under Linux and found a package called IEs4Linux
that provides an easy way to install 3 IE versions on Linux.
Here is a little tutorial how to install the IE on Ubuntu Feisty.
OK, first a note:
IEs4Linux is under GPL but IE is not, so you must have a legal Windows copy otherwise installing IE is illegal!
Legal notices
Here we go.
First we have to install wine (skip this step if you already have wine)
Edit the sources.list and add the repositories.
Use your prefered editor to do this. (nano, vi, gedit...)
BASH-Code:
| sudo nano /etc/apt/sources.list |
Add the repositories:
BASH-Code:
| deb http://de.archive.ubuntu.com/ubuntu feisty universe deb http://wine.budgetdedicated.com/apt feisty main |
Refresh the package list and install wine
BASH-Code:
| sudo apt-get update sudo apt-get install wine cabextract |
---
Installing IEs4Linux
Install IEs4Linux, do this as normal user!
BASH-Code:
| wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
tar zxvf ies4linux-latest.tar.gz
cd ies4linux-*
./ies4linux |
After a while the installation will finish an you can use your IEs:
from shell:
BASH-Code:
| /home/username/bin/ie6 /home/username/bin/ie55 /home/username/bin/ie5 |
There also should be some nice icons on your Desktop.
Virtual Penis
2007-06-09 by xpheas
This funky Shell-Script calculates the penis length of your computer.
Usage:
Save as vpenis.sh and make it executable (> chmod a+x vpenis.sh)
> ./vpenis.sh
Have fun!
PS: My computers length: 86.2cm *gg*
UPDATE
Thanks to black07 for the bug report!
There was a problem with the code-highlight function, which is fixed now.
BASH-Code:
| #!/bin/sh LC_ALL=C echo `uptime|grep days|sed 's/.*up \([0-9]*\) day.*/\1\/10+/'; \ cat /proc/cpuinfo|grep MHz|awk '{print $4"/30 +";}'; free|grep '^Mem' \ |awk '{print $3"/1024/3+"}'; df -P -k -x nfs | grep -v 1k \ | awk '{if ($1 ~ "/dev/(scsi|sd)"){ s+= $2} s+= $2;} END \ {print s/1024/50"/15+70";}'`|bc|sed 's/\(.$\)/.\1cm/' |
Usage:
Save as vpenis.sh and make it executable (> chmod a+x vpenis.sh)
> ./vpenis.sh
Have fun!
PS: My computers length: 86.2cm *gg*
UPDATE
Thanks to black07 for the bug report!
There was a problem with the code-highlight function, which is fixed now.
YouTube and valid XHTML
2007-06-07 by xpheas
I brodcast some YouTube and Zabim movies on my blog,
The uncool thing is that, that the YouTube and Zabim embed Tag is actually not XHTML valid.
The YouTube embed Tag looks like this:
It contains the <embed> tag, which is not allowed in XHTML 1.0 Strict.
To make the code valid, i changed the code abrove to something like this:
YouTube and Zabim plays well and it's valid XHTML 1.0 Strict!
The uncool thing is that, that the YouTube and Zabim embed Tag is actually not XHTML valid.
The YouTube embed Tag looks like this:
HTML-Code:
| <object width="425" height="350"> <param name="movie" value="http://www.youtube.com/v/WTC0UvS9mXA"></param> <param name="wmode" value="transparent"></param> <embed src="http://www.youtube.com/v/WTC0UvS9mXA" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed> </object> |
It contains the <embed> tag, which is not allowed in XHTML 1.0 Strict.
To make the code valid, i changed the code abrove to something like this:
HTML-Code:
YouTube and Zabim plays well and it's valid XHTML 1.0 Strict!