December 15, 2009

0

Howto Backup and Restore SD card image with tar and dd

Just my quick post today... I'm quite busy these days...



I normally backup my embedded system SD card image using dd and the output size will be 969M. To reduce the size, I'm using tar and gzip to compress the image file. Here is the command:

# dd if=/dev/sdd of=sd1gb.dd
$ tar zcvf sd1gb.dd.tar.gz


This way I will have the image in tar.gz file which is only 218MB. And delete the dd file.

However, to use the tar.gz, we don't have to extract the file because we can only use a single command like this:

# tar Ozxf sd1gb.dd.tar.gz | dd of=/dev/sdd


That's all for today... see u later!


Bookmark This Article:
Feed Me Digg Technorati del.icio.us Best to Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy




November 14, 2009

4

How to Create Hyperlink on Blogger Header

Today, I got this question in comment of my previous tutorial on How to Create Hyperlink on Blogger Post.

Barbara Fowlds L.Ac.: "Can I put a hyperlink in my header of my blogspot blog and if so how?"

My answer is Yes you can. And here's how to do it in the simplest newbie way.

Before that, I assume you may wanted to add this hyperlink on your Blogger Header Description because maybe you want to invite your visitor to your business website or any other sites you have. For example, I may like to invite my blog reader to read my art blog at http://artofapogee.blogspot.com and my blog description says something like this:

Feel free to visit Art Of ApOgEE Blog to see my arts and order some graphic design books

And now we wanna link that blue "Art Of ApOgEE Blog" to http://artofapogee.blogspot.com

This is the simplest way. You just have to copy paste and no coding . Here's the step:

  1. Open up New Post on you blogger, select Edit Html and type the words there:


  2. Select the text we want to link and create the link:

    Just follow the same way like we did in How to Create Hyperlink on Blogger Post.

  3. Select all text and copy:


  4. Open the Layout tab and Edit your header:


  5. Paste the copied text to your Blog Description and Save:



That's all, now you have the link on your Blogger Header Description. Enjoy coding and Happy Blogging!!






Bookmark This Article:
Feed Me Digg Technorati del.icio.us Best to Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy

November 13, 2009

0

Beginning LISP Programming in Ubuntu

For any reason, you may wanted to start learning Lisp Programming. However, you may wondering where to start. So here again, I'm going to share with you. How to begin Lisp Programming, "the programmable programming language".

As, I'm using Ubuntu here, this example is shown step by step on Ubuntu.

In order to start playing with Lisp on your ubuntu, you need to install CMUCL. CMUCL is a free implementation of Common Lisp which was originally developed at Carnegie Mellon University. To install CMUCL package, just run this command on your Ubuntu terminal:

$ sudo apt-get install cmucl

Next, we are going to feel the environment. Open up your terminal and type:

$ lisp

You will be greeted by CMU Common Lisp with it version and loaded subsystem. In my case, I see like this.

apogee@apogee-ubuntu:~$ lisp
CMU Common Lisp CVS release-19a 19a-release-20040728 + minimal debian patches, running on apogee-ubuntu
With core: /usr/lib/cmucl/lisp.core
Dumped on: Fri, 2009-11-13 09:05:47+08:00 on apogee-ubuntu
For support see http://www.cons.org/cmucl/support.html Send bug reports to the debian BTS.
or to pvaneynd@debian.org
type (help) for help, (quit) to exit, and (demo) to see the demos

Loaded subsystems:
Python 1.1, target Intel x86
CLOS based on Gerd's PCL 2004/04/14 03:32:47
*

As you can see the loaded subsystem is Python 1.1. This is not the Python as in Python Programming. Don't get confused. It is a native code compiler named "Python". If Common Lisp source code has been written with appropriate declarations and is organized with speed in mind, the Python compiler generates code that is almost free from overhead compared to code compiled from languages like C++. Some inefficiencies such as function call interfaces and lack of pointer-free arrays of user-defined data types are dictated by the Common Lisp standard and still need to be worked around (e.g. by inlining more and using macros to build constructs that look like user-defined structures but are actually accessing fields in preallocated specialized arrays). The Python compiler also features powerful type inferences, helping the programmer in writing overhead-free code by either inferring types automatically or issuing hints about missed optimization opportunities.

Before doing anything else, you have to know how to exit from this environment. To exit from this lisp terminal, you can simply type (quit) and press enter.

apogee@apogee-ubuntu:~$ lisp
CMU Common Lisp CVS release-19a 19a-release-20040728 + minimal debian patches, running on apogee-ubuntu
With core: /usr/lib/cmucl/lisp.core
Dumped on: Fri, 2009-11-13 09:05:47+08:00 on apogee-ubuntu
For support see http://www.cons.org/cmucl/support.html Send bug reports to the debian BTS.
or to pvaneynd@debian.org
type (help) for help, (quit) to exit, and (demo) to see the demos

Loaded subsystems:
Python 1.1, target Intel x86
CLOS based on Gerd's PCL 2004/04/14 03:32:47
* (quit)
apogee@apogee-ubuntu:~$

Now you know how to start and end the CMU Common Lisp. We can start playing with codes. Here is some example:

1. Adding Numbers:

* (+ 200 800 300 700 19 10)

2029
*

Notice my code started with '(' and end with ')'.

2. Subtract Numbers:

* (* 12 2 3)

72


3. Or even Adding and Subtract:

* (+ (* 12 2 3) 1)

73


There you go. From here you can try more stuff by following these tutorials and manual:


That's all for now mates.. Happy Coding!!


Bookmark This Article:
Feed Me Digg Technorati del.icio.us Best to Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy