After 15 days, it seems I build nothing on the website, but I have something to talk. My most concern is I have to use a powerful editor such as vim which will make changes on pages more easily and more controllable.
Markdown: Basically it is two things. One, a light-markup language, the syntax is similar to emacs-wiki I have used to write notes before, and I can use the language in vim to write pages. Second, a perl software tool to convert the written markdown to html.
Markup RW plugin: It is a Rapidweaver plugin, it support markdown language, thus I can use markdown in Rapidweaver, also the plugin contains a bash interface, which could be most meaningful to me -- a programmer.
Blocks: fromPaul,it seems that Blocks is a must have plugin with rapidweaver. The price is an issue, compared to RW (36CAD with coupon), it costs 26CAD, is it valuable to spent for just a plugin. Right now, I think it is worth after I bought it online, it provides me a simple way to design my website as I am not a designer, so I feel great although I need to figure out the usage such as use page blocks, html blocks or align images, etc. One good thing to me is Blocks works with the markup plugin. It is obviously that markdown can be used in blocks.
webyep: NOT choosed as a result.
PlusKit: it supports Markdown and bash, but I have difficulty to use it with blocks, don't know why.
accordion: Anthor beautiful plugin from yourhead, I see some nice samples but not got a chance to try, would like to investe the use with it.
Wednesday, February 27, 2008
Wednesday, February 20, 2008
setup a website - foyep.org
I spent a whole night to setup a new website, I feel I need to create a site on Buddhism (in Chinese). To register and setup my host account with Godaddy is so efficient, they are doing a great job.
RapidWeaver - I have fiddling it for a little while, liked or dis-liked, but it should be a top 10 Mac application. I used it to create and weave my pages and publish to my website, it also includes some nice and clean themes. The forum of RapidWeaver is quite good.
Ralf Simple Theme - A quite nice theme I choose when I don't want to use the default themes from RW.
webyep - I may feel sad with RW until I found the Webyep plugin, I have never imagen to use CMS but I like the idea, especially when I found it is developed by the guys who bring LaunchBar, while LaunchBar is so impressive to me and it is my #1 Mac Application.
Still need learning to fill the gap, but here is my website, still in construction.
RapidWeaver - I have fiddling it for a little while, liked or dis-liked, but it should be a top 10 Mac application. I used it to create and weave my pages and publish to my website, it also includes some nice and clean themes. The forum of RapidWeaver is quite good.
Ralf Simple Theme - A quite nice theme I choose when I don't want to use the default themes from RW.
webyep - I may feel sad with RW until I found the Webyep plugin, I have never imagen to use CMS but I like the idea, especially when I found it is developed by the guys who bring LaunchBar, while LaunchBar is so impressive to me and it is my #1 Mac Application.
Still need learning to fill the gap, but here is my website, still in construction.
Thursday, January 31, 2008
Install Gentoo VM on Macbook -1
I use Minimum CD, the installation is more hard than using a liveCD, so I failed a bunch of times. And as my learning, I started installation with stage3, so I don't need to catch stage1 and stage2, but even stage3, is a lot to me. Every time with Minimum CD, I have to get stage3 and portage, so at last I save them to another machine that I can easily get with ssh.
0 startup with Minimum CD
vmware: other linux 2.6.x
connected: NAT
1 check network
- ifconfig => eth0
- dhcpcd => some times need it if eth0 did not show ip address
- ssh => connect with my file server where I save stage3 and portage etc.
/etc/init.d/sshd start
ssh 192.168.0.104
2 prepare disks...
- fdisk /dev/sda
=> /dev/sda1 for boot
=> /dev/sda2 for swap
=> /dev/sda3 for / (the root)
mkfs.ext2 /dev/sda1
mkfs.ext3 /dev/sda3
mkswap /dev/sda2
swapon /dev/sda2
mount /dev/sda3 /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/sda1 /mnt/gentoo/boot
3 install stage3 and portage
scp -p -r 192.168.0.104:/root/gentoo .
cd /mnt/gentoo
tar xjpf stage3-<>.tar.bz2
tar xjf portage-<>.tar.bz2 -C /mnt/gentoo/usr
4. env setup
vi /mnt/gentoo/etc/make.conf
CFLAGS as "-O2 -march=prescott -fomit-frame-pointer -pipe"
mirrorselect -i -o >> /mnt/gentoo/etc/make.conf
cp -L /etc/resolv.conf /mnt/gentoo/etc
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="{chroot} $PS1"
5. emerge -sync --quiet
emerge vim lilo subversion
6. vi /etc/fstab
7. network
vi /etc/conf.d/hostname => "gentoovm"
vi /etc/conf.d/net => for dhcp: config_eth0="dhcp", but i did not set.
rc-update add net.eth0 default => boot eth0 as default
emerge dhcpcd => MUST
vi /etc/hosts
=> 127.0.0.1 gentoovm.homenetwork gentoovm localhost
8. System
passwd => MUST
useradd
emerge syslog-ng vixie-cron
rc-update add syslog-ng default
rc-update add vixie-cron default
9. lilo
vi /etc/lilo.conf
prepare the default kernel (from ssh) and save to /boot
/sbin/lilo
10 reboot
Friday, January 18, 2008
xwd : capture window on linux
Wednesday, January 16, 2008
gcc - shared library
When I link the shared library in dynamic mode on FC5 (Fedoral Core 5), I got a failure when run my executables: "cannot restore segment prot after reloc: Permission denied", is it only happend on FC5?
Here is the solution:
# make compile
/opt/crosstool/i686-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/bin/i686-unknown-linux-gnu-g++ -x c++ -c -Wall -Wno-unknown-pragmas -fno-common -fbounds-check -pipe -g -Wno-deprecated -pipe -o foo.o foo.cpp
/opt/crosstool/i686-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/bin/i686-unknown-linux-gnu-g++ -shared -o libfoo.so foo.o -lc
/opt/crosstool/i686-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/bin/i686-unknown-linux-gnu-ar -rcs libfoo.a foo.o
/opt/crosstool/i686-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/bin/i686-unknown-linux-gnu-g++ -x c++ -c -Wall -Wno-unknown-pragmas -fno-common -fbounds-check -pipe -g -Wno-deprecated -pipe -o test.o test.cpp
/opt/crosstool/i686-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/bin/i686-unknown-linux-gnu-g++ -dynamic -L. -lfoo -o test test.o
/opt/crosstool/i686-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/bin/i686-unknown-linux-gnu-g++ -static -L. -lfoo -o test.static test.o libfoo.a
# ./test
./test: error while loading shared libraries: ./libfoo.so: cannot restore segment prot after reloc: Permission d[...]
Here is the solution:
# chcon -t textrel_shlib_t ./libfoo.so
Wednesday, January 9, 2008
version controls with cvs
0. I have a simple script to set my working CVSROOT. So when I work on it. I just run the script.
Here is cvs.sh script.(which is just 2 lines)
1. Create a branch with tag.
To create a branch, you first need to check out the source code. here FOO is the module name and foo is the checkout directory.
2. Work on a branch.
3. Merge from a branch
It will merge the branch to where you currently work on (can be main trunk or a branch)
4. Commit your changes
When you merge the code from a branch, it does not commit yet, so you need to commit it.
5. To delete a branch tag. (THIS SHOULD BE VERY CAREFUL!)
. cvs.sh
Here is cvs.sh script.(which is just 2 lines)
#! /bin/sh
export CVSROOT=":pserver:user:192.168.10.7:2401/home/repository"
1. Create a branch with tag.
cvs co -P -d foo FOO
cvs tag -b z_markc_unknown
To create a branch, you first need to check out the source code. here FOO is the module name and foo is the checkout directory.
2. Work on a branch.
cvs co -P -d foo -r z_markc_unknown FOO
3. Merge from a branch
cd foo
cvs update -j z_markc_1
It will merge the branch to where you currently work on (can be main trunk or a branch)
4. Commit your changes
cvs update
cvs diff Makefile
cvs commit Makefile
When you merge the code from a branch, it does not commit yet, so you need to commit it.
5. To delete a branch tag. (THIS SHOULD BE VERY CAREFUL!)
cd foo
cvs tag -dB z_markc_1
Tuesday, January 8, 2008
Work on iPAQ 5550 PocketPC
Use the COM port to connect with PC. On Windows, HyperTerminal is perfact for the connection. In most time, it is desire to work on Linux, here is the way to connect througth ssh on my Linux Host:
you need to get the ip address, user name and password to enter into the system.
To find out the ip address, you can start the terminal in iPAQ (GPE installed), and type ifconfig.
Copy files forth and back with scp on Linux Host:
Right now my iPAQ's ip address is connected to the wireless network, and is associated with an external ip address (NOT 192*), so it can not ping my internel network, but the linux host can ping the external ip address. That is why scp works.
ssh root@192.168.10.177
you need to get the ip address, user name and password to enter into the system.
To find out the ip address, you can start the terminal in iPAQ (GPE installed), and type ifconfig.
Copy files forth and back with scp on Linux Host:
scp foo root@192.168.10.177:/home/root
scp -p -r root@192.168.10.177:/home/root/foo foo
Right now my iPAQ's ip address is connected to the wireless network, and is associated with an external ip address (NOT 192*), so it can not ping my internel network, but the linux host can ping the external ip address. That is why scp works.
Subscribe to:
Posts (Atom)