Moving blogs from Qzone to My Own website

Since I’ve wrote blog for more than 7 year, I decide to use my own website to hold all of the articles. So I will start a task for transferring all of the written articles to a new website. Following will be the steps for transferring.
###Which blog system I will use I decide to use static webiste, since the speed is much more faster than the database-based website, and it doesn’t have complicated configuration. Also It’s easy to backup and deploy.
I don’t want to use Octopress, because Octopress is good for recording for technical issues. And Octopress is based on ruby, while I decide to try python based static website generator.
I will choose Hyde. The website for Hyde is located at “http://ringce.com/hyde”, you can get the brief introduction on this website.
###Installation Install hyde directly from yaourt:

	$ yaourt hyde

Or you can directly download the package from the website, and unzip it to a suitable directory, install it.
The most simplest way is via:

	$ pip install hyde

Because my machine runs python3, while hyde currently works under python2, everytime I use hyde, just:

	$ workon venv2
	$ which hyde
	/home/Trusty/.virtualenvs/venv2/bin/hyde

It is recommended that use virtualenv to seperate the hyde environment from other python projects. Refer to “http://hyde.github.io/install”
###Get Demo Site run Create the website:

	$ hyde create

Compile all of the hyde source in the “deploy” directory:

	$ hyde gen

Run a light-weight server enable you to preview the current website $ hyde serve Browser “http://localhost:8080” will see the current website.

After careful consideration, I think maybe I will try hyde later, because a better tool named pelican may fit me better.
“http://blog.getpelican.com/"

Update blog from Home Computer

First , clone th repository to your home computer via:

	git clone git@github.com/your_name/Your_Repository

Second , configure everything:

	sudo gem install bundler
	rbenv rehash
	bundle install
	rake setup_github_pages

Here you will be asked to provide your accounts, enter it and continue.
Third, do changing the content and deploy .

	rake generate
	git add . 
	git commit -am "From Home computer"
	git push origin master
	rake deploy

In Company computer, run:

	git pull origin master
	cd ./_deploy
	git pull origin master

HMC5883L on RaspberryPI(2)

Here are some explanation on the code in “HMC5883L on RaspberryPI”.
The i2clibraries calls the “quick2wire” library.

	root@rasp:~/code/i2c/pythoncode# grep "quick2wire" ./ -r
	./i2clibraries/i2c.py:from quick2wire.i2c import I2CMaster, writing_bytes, reading
	Binary file ./i2clibraries/__pycache__/i2c.cpython-32.pyc matches
	Binary file ./i2clibraries/i2c.pyc matches

So we have to include QUICK2WIRE_API_HOME into the PYTHONPATH:

	export QUICK2WIRE_API_HOME=~/code/i2c/quick2wire-python-api/
	export PYTHONPATH=$PYTHONPATH:$QUICK2WIRE_API_HOME

So notice you have to specify the correct directory which contains the corresponding code.

	root@rasp:~/code/i2c# tree -d
	.
	├── pythoncode
	│   └── i2clibraries
	│       └── __pycache__
	└── quick2wire-python-api
	    ├── doc
	    ├── examples
	    ├── quick2wire
	    │   ├── helpers
	    │   ├── parts
	    │   └── __pycache__
	    └── tools
	
	11 directories

Install parole in ArchLinux

Just 2 steps:

	$ sudo pacman -S parole
	$ sudo pacman -S gst-libav gst-plugins-bad gst-plugins-ugly gst-plugins-base xulrunner

How to manage wordpress based CMS

What is CMS?
Content Management System.
###登入管理 Click “登入管理”
wordpress1.jpg

###增加新页面 页面会出现在导航栏中,如下:
wordpress2.jpg
增加方法:
wordpress3.jpg
开始撰写新页面:
wordpress4.jpg
点”发布”,可以看到新增加的页面
wordpress5.jpg
###如何在父页面下增加新页面 我们需要在这个下拉列表中增加一个“”新增页面“”的页面
wordpress6.jpg
新建-> 页面,到撰写窗口
wordpress7.jpg
这时候可以看到:
wordpress8.jpg
###编辑box内容 Box是该模板使用的小插件,如果需要定制的话,可以依下面步骤进行.
wordpress9.jpg
如何自定义Box? 后台点击ifeatures选项:
wordpress10.jpg
在出现的页面中点击博客->盒子精简版:
wordpress11.jpg

Wordpress是一个很强大的内容管理系统,更多的特性可以在后台直接摸索出来,例如,添加博客,添加视频等等。Don’t afraid of it, Just Enjoy it.