Friday 24 August 2012

Extending NS3 with your module and extra libraries

I have been working on custom module in ns3 for some time now. Due to many changes in NS3, like bug fixes, extensions, improvements, I decided to move to latest version.

This decision consumed couple of days and several gray hair, due to lack of documentation. The biggest difference for custom module developer is the new waf build system and thus how build works.

Reading http://www.nsnam.org/wiki/index.php/HOWTO_use_ns-3_with_other_libraries it seems very simple to add additional libraries, however the tutorial is not valid for module. Because the suggested build steps will only link the individual files with external libraries and NOT the module. The flags are only passed when compiling indivirual object, the bug (?) is reported.

So here is how I managed to solve it

First, add configuration in your wafscript script
def configure(conf):
     conf.env['xercersc'] = conf.check(mandatory=True, lib='xerces-c', uselib_store='XERCES')
     conf.env['ldl'] = conf.check(mandatory=True, lib='dl', uselib_store='LDL')
 
make sure you change naming to your libs, note also the name of library, you have to omit "lib", "l" and only go by the name. Having mandatory=True will abort the compilation if waf can not find the library.

Second and last

def build(bld):
    #......
    #...... code omited
    #......
    module.use.append("XERCES")
    module.use.append("LDL")
    #......
    #...... the rest of build code
Delete build directory run
./waf configure && ./waf build
If you still having problems with linking it is very useful to run
./waf --no-task-lines -v
In that case after each build step waf will output runner were the compiler and all passed flags are visible. From there you can continue bug hunt :)

Cheers

Friday 10 August 2012

TinyOS on Ubuntu 12.04 update error, the fix

 TinyOS released the update to tinysos-tools package. However, if updating from GUI of update manager you will get an error

The action would require the installation of packages from not authenticated sources.

And update will be aborted. To fix it, simply open terminal and run
sudo apt-get update
sudo apt-get upgrade
You will get two warning, proceed by answering Y and you are done!

Tuesday 7 August 2012

Install and run NS3 on Amazons EC2

This is simple step-by step on how to run NS3 on Amazon cloud. If you skip to 3 you can use same script on any other machine using Ubuntu.

This script will install needed packages, download ns3, make standard configuration, build ns-3-dev, and will run test.

Assuming you have Amazon account.

  1. Create Ubuntu 12.04 image
  2. Log in to it
  3. Create file installns3.sh
  4. vi installns3.sh
    i
    
  5. Copy following code into it:
  6. #!/bin/bash
    #original timer was published in
    #http://www.linuxjournal.com/
    #http://tiny.cc/en2niw 
    #by Mitch Frazier
    function timer()
    {
     if [[ $# -eq 0 ]]; then
      echo $(date '+%s')
     else
      local  stime=$1
      etime=$(date '+%s')
             if [[ -z "$stime" ]]; then stime=$etime; fi
             dt=$((etime - stime))
             ds=$((dt % 60))
             dm=$(((dt / 60) % 60))
      dh=$((dt / 3600))
      printf '%d:%02d:%02d' $dh $dm $ds
     fi
    }
    tmr=$(timer)
    INSTALL_DIR="/home/ubuntu/dev/ns3"
    #files to install 
    APPS="gcc g++ python python-dev mercurial bzr gdb valgrind gsl-bin \
     libgsl0-dev libgsl0ldbl flex bison libfl-dev tcpdump sqlite sqlite3 \
     libsqlite3-dev libxml2 libxml2-dev libgtk2.0-0 libgtk2.0-dev vtun \
     lxc uncrustify doxygen graphviz imagemagick texlive texlive-extra-utils \ 
     texlive-latex-extra python-sphinx dia python-pygraphviz python-kiwi \
     python-pygoocanvas libgoocanvas-dev libboost-signals-dev \ 
     libboost-filesystem-dev openmpi-bin libopenmpi-dev openmpi-doc"
    # update repos
    RETVAL=$(sudo apt-get update)
    if [ $? -ne 0 ]; then
     echo "Unable to update, reason: $?"
     echo $RETVAL
     exit 1
    else
     echo "Successfully updated app repostitory"
    fi
    #function to handle instaliation 
    function make_install(){
     if [ $# == 0 ]; then
             echo "must give at least one argument"
      exit 1
     fi
     for app in $*
     do
      #we do not care is packet is installed it is success
      RETVAL=$(sudo apt-get install -y $app 2>&1 >/dev/null)
      if [ $? -ne 0 ]; then
       echo "Failure: can't install $app reson: $?"
              echo $RETVAL
              echo "Skipping package $app" 
      else
       echo "Succesfully installed $app"
      fi
    
     done
    }
    
    #create directory
    if [ ! -d "$INSTALL_DIR" ]; then
     echo "Creating $INSTALL_DIR"
     RET=$(mkdir -p $INSTALL_DIR 2>&1 >/dev/null)
     if [ $? -ne 0 ]; then
      echo "Can not create directory $INSTALL_DIR. Reason: $?"
      echo $RET
      exit 1
     else
      echo "Succesfully created directory $INSTALL_DIR"
     fi
    fi
    #check if port is open
    
    #install apps
    make_install $APPS
    
    cd $INSTALL_DIR
    echo "Cloning repo"
    RET=$(hg clone http://code.nsnam.org/ns-3-allinone)
    if [ $? -ne 0 ]; then
     echo "Could not clone ns-3-allinone. REASON: $?"
     echo $RET
     exit 1
    else
     echo "Cloning was successfull"
    fi
    cd "ns-3-allinone"
    echo "Downloading ns3-dev"
    chmod +x download.py
    ./download.py -n ns-3-dev
    cd "ns-3-dev"
    echo "Building standart ns3"
    ./waf configure --enable-tests
    ./waf build
    echo "Running test"
    chmod +x test.py
    ./test.py
    printf 'Elapsed time: %s\n' $(timer $tmr) 
    echo "Thank you! Enjoy NS3"
    
  7. Save file and execute it.
  8. #hit esc
    :wq
    chmod +x installns3.sh
    ./installns3.sh
    #go grab coffee
    
  9. It will take a while, I was using medium instance which took: ~34 min.
If you are to lazy to copy paste and bother, find "ubuntu-12.04-ns-3-dev" AMI in community AMI's I have published pre-installed and pre-build version of the image. It will save you time and buck too!

Cheers :)

Monday 6 August 2012

TOSSIM simulations on Amazon AWS

There can be many reasons why you want to run your TOSSIM simulations on cloud.
  • Share same apps and environment with your coworkers.
  • Give access to students.
  • Run gi-norm-ous  simulation.
  • etc
Edit: if you for some reason do not want to create your own installation, search publics for ubuntu-12.04-tinyos-tossim, I have published an AMI with preinstalled TinyOS 2.1.1 and svn version ready to use!
 
What ever reason is here is how-to guide for running both release and svn version of TinyOS simulator TOSSIM, one assumption is that you have AWS account.
  1. Create  EBS volume.
  2. Create EC2 instance and start it (it is enough to have ssh port open), type does not matter since you can change it later. The only assumption that you run Ubuntu 12.04 64 bit version.
  3. Log in to the instance
  4. Create and edit source file
  5. sudo vi /etc/apt/sources.list.d/tinyos.list
    #in vi paste
    deb http://tinyos.stanford.edu/tinyos/dists/ubuntu natty main
    #hit esc and 
    :wq
    
  6. Install main release of TinyOS
  7. sudo apt-get update && sudo apt-get install -y --force-yes tinyos-2.1.1
    #fix ownership 
    sudo chown -R ubuntu:ubuntu /opt/tinyos-2.1.1
    
    With the -y --force-yes following packages will be installed:
    Setting up libasound2 (1.0.25-1ubuntu10.1) ...
    Setting up libasyncns0 (0.8-4) ...
    Setting up libatk1.0-data (2.4.0-0ubuntu1) ...
    Setting up libatk1.0-0 (2.4.0-0ubuntu1) ...
    Setting up libgtk2.0-common (2.24.10-0ubuntu6) ...
    Setting up ttf-dejavu-core (2.33-2ubuntu1) ...
    Setting up fontconfig-config (2.8.0-3ubuntu9) ...
    Setting up libfontconfig1 (2.8.0-3ubuntu9) ...
    Setting up libpixman-1-0 (0.24.4-1) ...
    Setting up libxcb-render0 (1.8.1-1) ...
    Setting up libxcb-shm0 (1.8.1-1) ...
    Setting up libxrender1 (1:0.9.6-2build1) ...
    Setting up libcairo2 (1.10.2-6.1ubuntu3) ...
    Setting up libavahi-common-data (0.6.30-5ubuntu2) ...
    Setting up libavahi-common3 (0.6.30-5ubuntu2) ...
    Setting up libavahi-client3 (0.6.30-5ubuntu2) ...
    Setting up libcups2 (1.5.3-0ubuntu2) ...
    Setting up libjpeg-turbo8 (1.1.90+svn733-0ubuntu4.1) ...
    Setting up libjpeg8 (8c-2ubuntu7) ...
    Setting up libjasper1 (1.900.1-13) ...
    Setting up libtiff4 (3.9.5-2ubuntu1.2) ...
    Setting up libgdk-pixbuf2.0-common (2.26.1-1) ...
    Setting up libgdk-pixbuf2.0-0 (2.26.1-1) ...
    Setting up libthai-data (0.1.16-3) ...
    Setting up libdatrie1 (0.2.5-3) ...
    Setting up libthai0 (0.1.16-3) ...
    Setting up libxft2 (2.2.0-3ubuntu2) ...
    Setting up fontconfig (2.8.0-3ubuntu9) ...
    Cleaning up old fontconfig caches... done.
    Regenerating fonts cache... done.
    Setting up libpango1.0-0 (1.30.0-0ubuntu3.1) ...
    Setting up libxcomposite1 (1:0.4.3-2build1) ...
    Setting up libxfixes3 (1:5.0-4ubuntu4) ...
    Setting up libxcursor1 (1:1.1.12-1) ...
    Setting up libxdamage1 (1:1.1.3-2build1) ...
    Setting up libxi6 (2:1.6.0-0ubuntu2) ...
    Setting up libxinerama1 (2:1.1.1-3build1) ...
    Setting up libxrandr2 (2:1.3.2-2) ...
    Setting up shared-mime-info (1.0-0ubuntu4.1) ...
    Setting up libgtk2.0-0 (2.24.10-0ubuntu6) ...
    Setting up libnspr4 (4.8.9-1ubuntu2) ...
    Setting up libnss3 (3.13.1.with.ckbi.1.88-1ubuntu6) ...
    Setting up libnss3-1d (3.13.1.with.ckbi.1.88-1ubuntu6) ...
    Setting up tzdata-java (2012b-1) ...
    Setting up java-common (0.43ubuntu2) ...
    Setting up libgif4 (4.1.6-9ubuntu1) ...
    Setting up libjson0 (0.9-1ubuntu1) ...
    Setting up libogg0 (1.2.2~dfsg-1ubuntu1) ...
    Setting up libflac8 (1.2.1-6) ...
    Setting up libvorbis0a (1.3.2-1ubuntu3) ...
    Setting up libvorbisenc2 (1.3.2-1ubuntu3) ...
    Setting up libsndfile1 (1.0.25-4) ...
    Setting up libpulse0 (1:1.1-0ubuntu15.1) ...
    Setting up x11-common (1:7.6+12ubuntu1) ...
    Setting up libxtst6 (2:1.2.0-4) ...
    Setting up libgomp1 (4.6.3-1ubuntu5) ...
    Setting up libice6 (2:1.0.7-2build1) ...
    Setting up libmpfr4 (3.1.0-3ubuntu2) ...
    Setting up libquadmath0 (4.6.3-1ubuntu5) ...
    Setting up libsm6 (2:1.2.0-2build1) ...
    Setting up libxt6 (1:1.1.1-2build1) ...
    Setting up libxmu6 (2:1.1.0-3) ...
    Setting up libxpm4 (1:3.5.9-4) ...
    Setting up libxaw7 (2:1.0.9-3ubuntu1) ...
    Setting up libgd2-noxpm (2.0.36~rc1~dfsg-6ubuntu2) ...
    Setting up libmpc2 (0.9-4) ...
    Setting up tinyos-base (2.1-20080806) ...
    Setting up avr-tinyos-base (2.1-20080806) ...
    Setting up avr-binutils-tinyos (2.17-20080812) ...
    Setting up avr-gcc-tinyos (4.1.2-20080812) ...
    Setting up avr-libc-tinyos (1.4.7-20080812) ...
    Setting up avrdude-tinyos (5.4-20080812) ...
    Setting up avr-tinyos (2.1-20080806) ...
    Setting up avr-optional-tinyos (2.1-20090326) ...
    Setting up binutils (2.22-6ubuntu1) ...
    Setting up cpp-4.6 (4.6.3-1ubuntu5) ...
    Setting up cpp (4:4.6.3-1ubuntu5) ...
    Setting up libc-dev-bin (2.15-0ubuntu10) ...
    Setting up linux-libc-dev (3.2.0-27.43) ...
    Setting up libc6-dev (2.15-0ubuntu10) ...
    Setting up nesc (1.3.3-20110821) ...
    Setting up tinyos-tools (1.4.0-20100326) ...
    Setting up deputy-tinyos (1.1-20080807) ...
    Setting up fonts-liberation (1.07.0-2ubuntu0.1) ...
    Setting up gcc-4.6 (4.6.3-1ubuntu5) ...
    Setting up gcc (4:4.6.3-1ubuntu5) ...
    Setting up libcdt4 (2.26.3-10ubuntu1) ...
    Setting up libcgraph5 (2.26.3-10ubuntu1) ...
    Setting up libgraph4 (2.26.3-10ubuntu1) ...
    Setting up libpathplan4 (2.26.3-10ubuntu1) ...
    Setting up libgvc5 (2.26.3-10ubuntu1) ...
    Setting up libgvpr1 (2.26.3-10ubuntu1) ...
    Setting up graphviz (2.26.3-10ubuntu1) ...
    Setting up hicolor-icon-theme (0.12-1ubuntu2) ...
    Setting up libgtk2.0-bin (2.24.10-0ubuntu6) ...
    Setting up xorg-sgml-doctools (1:1.10-1) ...
    Setting up x11proto-core-dev (7.0.22-1) ...
    Setting up libice-dev (2:1.0.7-2build1) ...
    Setting up libpthread-stubs0 (0.3-3) ...
    Setting up libpthread-stubs0-dev (0.3-3) ...
    Setting up libsm-dev (2:1.2.0-2build1) ...
    Setting up libxau-dev (1:1.0.6-4) ...
    Setting up libxdmcp-dev (1:1.1.0-4) ...
    Setting up x11proto-input-dev (2.1.99.6-1) ...
    Setting up x11proto-kb-dev (1.0.5-2) ...
    Setting up xtrans-dev (1.2.6-2) ...
    Setting up libxcb1-dev (1.8.1-1) ...
    Setting up libx11-dev (2:1.4.99.1-0ubuntu2) ...
    Setting up libx11-doc (2:1.4.99.1-0ubuntu2) ...
    Setting up libxt-dev (1:1.1.1-2build1) ...
    Setting up manpages-dev (3.35-0.1ubuntu1) ...
    Setting up msp430-binutils-tinyos (2.21.1-20110821) ...
    Setting up msp430-gcc-tinyos (4.5.3-20110821) ...
    Setting up msp430-libc-tinyos (20110612-20110821) ...
    Setting up msp430mcu-tinyos (20110613-20110821) ...
    Setting up msp430-tinyos (20110821) ...
    Setting up tinyos-required-msp430 (2.1-20090326) ...
    Setting up tinyos-required-avr (2.1-20090326) ...
    Setting up tinyos-required-all (2.1-20090326) ...
    Setting up tinyos-2.1.1 (2.1.1-20100401) ...
    Setting up ttf-dejavu-extra (2.33-2ubuntu1) ...
    Setting up ttf-liberation (1.07.0-2ubuntu0.1) ...
    Setting up icedtea-netx-common (1.2-2ubuntu1.1) ...
    Setting up openjdk-6-jre-headless (6b24-1.11.3-1ubuntu0.12.04.1) ...
    
  8. Install svn release of TinyOS, the directory root is of your chois, I just like keep things organised
  9. sudo apt-get install subversion
    mkdir /home/your_user/dev
    cd dev
    mkdir tiny-os-svn
    #checkout the trunk version
    svn checkout http://tinyos-main.googlecode.com/svn/trunk/ tinyos-main-read-only
    
    
    
  10. Fix .bashrc
  11. vi .bashrc
    i
    #paste
    TOSROOT_BASE="/opt/tinyos-2.1.1"
    TOSROOT_SVN="/home/ubuntu/dev/tiny-os-svn/trunk"
    #TOSROOT=$TOSROOT_SVN #swap TOSROOT to change to different version of TinyOS
    TOSROOT=$TOSROOT_BASE 
    TOSDIR="$TOSROOT/tos"
    CLASSPATH=.:$TOSROOT/support/sdk/java:$TOSROOT/support/sdk/java/tinyos.jar:$CLASSPATH
    MAKERULES="$TOSROOT/support/make/Makerules"
    PYTHONPATH=$PYTHONPATH:$TOSROOT/support/sdk/python
    export TOSROOT
    export TOSDIR
    export CLASSPATH
    export MAKERULES
    export PYTHONPATH
    
    #reload bash
    source /home/ubuntu/.bashrc
    
  12. Fix JNI
  13. sudo tos-install-jni
    
  14. Install build tools
  15. sudo apt-get install build-essential python python-dev gdb
    
  16. Fix python version
  17. vi /opt/tinyos-2.1.1/support/make/sim.extra
    i
    #change PYTHON_VERSION=2.5 to
    PYTHON_VERSION ?= $(shell python --version 2>&1 | sed 's/Python 2\.\([0-9]\)\.[0-9]+\{0,1\}/2.\1/')
    
  18. Test installiation
  19. cd dev/tiny-os-svn/trunk/apps/Blink
    make micaz sim
    #should end with 
    *** Successfully built micaz TOSSIM library.
    
  20. Create and run simulation
  21. cd /opt/tinyos-2.1.1/apps/RadioCountToLeds
    make micaz sim
    
    Create topo.txt
    0  2 -66.0
     2  0 -67.0
     1  2 -54.0
     2  1 -55.0
     1  3 -60.0
     3  1 -60.0
     2  3 -64.0
     3  2 -64.0
    
    Create python packet.py (this is edited and fixed version of original packet.py)
    import sys
    from TOSSIM import *
    from RadioCountMsg import *
    
    t = Tossim([])
    m = t.mac();
    r = t.radio();
    
    t.addChannel("RadioCountToLedsC", sys.stdout)
    t.addChannel("LedsC", sys.stdout)
    
    for i in range(0, 2):
      m = t.getNode(i);
      m.bootAtTime((31 + t.ticksPerSecond() / 10) * i + 1)
    
    f = open("topo.txt", "r")
    lines = f.readlines()
    for line in lines:
      s = line.split()
      if (len(s) > 0):
        if (s[0] == "gain"):
          r.add(int(s[1]), int(s[2]), float(s[3]))
    
    noise = open("/opt/tinyos-2.1.1/tos/lib/tossim/noise/meyer-heavy.txt", "r")
    lines = noise.readlines()
    for line in lines:
      st = line.strip()
      if (st != ""):
        val = int(st)
        for i in range(0, 2):
          t.getNode(i).addNoiseTraceReading(val)
    
    for i in range(0, 60):
      t.runNextEvent()
    
    msg = RadioCountMsg()
    msg.set_counter(7)
    pkt = t.newPacket()
    pkt.setData(msg.data)
    pkt.setType(msg.get_amType())
    pkt.setDestination(0)
    
    print "Delivering %s to 0 at %s" %(str(msg),str(t.time() + 3))
    pkt.deliver(0, t.time() + 3)
    
    
    for i in range(0, 20):
      t.runNextEvent()
    
    
    Run in sequence
    python packet.py
    
     
    Lots of pretty output. Done! 
    For more info on simulations see http://docs.tinyos.net/tinywiki/index.php/TOSSIM. 
    Remember to stop your instance when you done!
    Happy WSN simulations!

Wireshark on AWS EC2

Updated on 28th Mars 2014, thanks Imran Hayder for suggestions! In some cases you may need to run wireshark on remote machine, especially if you want to in depth to understand what is going on.
Without any further blah blah, amusing you are using Ubuntu here is how to:

  1. Create EBS, make sure to un-check "delete on termination"
  2. Create and start Ubuntu 12.04 EC2
  3. Log in to it
  4. Check disk name
  5. sudo fdisk -l 
    
  6. Format disk
  7. sudo mkfs -t ext4 /device/path
    
  8. Create mount directory
  9. sudo mkdir /home/data-storage
    
  10. Mount disk
  11. sudo mount /dev/DEVICE /home/data-storage
    
  12. Make wireshark folder
  13. sudo mkdir /home/data-storage/wireshark
    #important change ownership!
    sudo chown root:ubuntu /home/data-storage/wireshark
    #allow group to read
    sudo chmod -R 774 wireshark
    
  14. Install wireshark
  15. sudo apt-get install wireshark tshark
    
  16. Run example
  17. sudo su
    cd /home/data-storage/wireshark
    #tshark will capture eth0 for 10 seconds and save file to my.pcap
    tshark -i eth0 -a duration:10 -w my.pcap
    
  18. Copy file to local
  19. #from your local machine, note intentional line brake due to layout of the blog.
    cd wireshark
    scp -i your.pem 
       ubuntu@your_ec2_dns.compute.amazonaws.com:/path-to/my.pcap .
    
Read the comments bellow for trouble shooting. Note, it is not advisable to copy paste commands since you may bet the html representation, and not what you should type in the terminal.

Saturday 14 April 2012

Ubuntu 12.04 on Lenovo x220

Ubuntu 12.04

There have been a lot of progress in Ubuntu! I got new Lenovo's Thinkpad X220 and immediately installed Ubuntu 12.04 64 bits. A short summary everything worked out of box, however, I did not tested fingerprint reader nor WiMax or mobile Broadband. The rest is smooth flow even with beta of Ubuntu. Boot time is really awesome, bringing the login screen 7s!

Thanks Canonical for Ubuntu! :)

Wednesday 4 April 2012

Export specific sub holder from svn on CentOS

Some time project grows in your repository and you may want to move it to separate repository or you want to share you work and open up repository from tight security. The reasons can be many but the process is the same.

(assuming root access, LATEST refers to the latest available version, procedure was tested on 0.5.8)

Install needed components
yum install subversion-devel httpd-devel
wget http://prdownloads.sourceforge.net/rsvndump/rsvndump-LATEST.tar.gz
tar xvfz rsvndump-LATEST.tar.gz
cd rsvndump-LATEST
./configure
make
sudo make install

Exporting your project
With rsvndump you don't need to use filters to extract your subfolder within svn, it will do it for you just in one command
rsvndump -v -u username -p psw  https://ulr/svn/repos/to/subfolder > subfolder

Create svn repository
svnadmin create /path/to/svn/project

Allow Apache to read it
chown -R apache:apache symphony

Import it dumped file
svnadmin load --force-uuid /path/to/svn/project < subfolder

Enable web access in Apache
LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so
<location svn="">
        SSLRequireSSL
        DAV svn
        SVNParentPath /path/to/svn
        AuthzSVNAccessFile /path/to/svn-acl-conf
        AuthType Basic
        AuthName "Subversion repos"
        AuthUserFile /path/to/svn-auth-conf
        Require valid-user
        SVNIndexXSLT "https://url/svnindex.xsl"
</location>

Enable access in svn-acl-conf
[project:/]
@project_users=rw

[repos:/]
@users=rw

Restart Apache
/etc/init.d/httpd restart

More info
The assumption in example is that all your repositories are in the /path/to/svn/ Then you can use only one conf file for Apache and control access to repositories :) and you are done!

Thursday 8 March 2012

Trac on Centos

cat httpd/conf.d/trac-project.conf

 #configuration 
#permament redirect for https
Redirect permanent http://path https://path
WSGIScriptAlias /project /var/www/html/project/cgi-bin/trac.wsgi
#with multiple project you need only alias it once 
Alias /trac/chrome/common /usr/share/trac/htdocs/common
Alias /trac/chrome/site /usr/share/trac/htdocs/site

<Directory /var/www/html/project/cgi-bin/>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>

<Location '/symphony'>
        SSLRequireSSL
        AuthType Basic
        AuthName "Trac symphony"
        AuthUserFile /usr/share/trac/projects/project/conf/trac.htpasswd
        Require valid-user
</Location> 



Back up trac
Since 0.13, trac back up include MySQL db back up, always good to have before upgrading.


 $ trac-admin /path/to/projenv hotcopy /path/to/backupdir
More info: http://trac.edgewall.org/wiki/0.13/TracBackup


 


Wednesday 7 March 2012

Code on blogger

Quite nice formating for posting code on blogger
</code></pre>
<pre style="font-family: Andale Mono, Lucida Console, 
Monaco, fixed, monospace; color: #000000; 
background-color: #eee;font-size: 12px;border: 1px dashed #999999;
line-height: 14px;padding: 5px; overflow: auto; width: 100%"><code>

</code></pre>