Posts

Configure Emacs's PATH environment in Mac OS X

Image
Configure Emacs's PATH environment in Mac OS X Table of Contents Background Why did that sad thing happen? 1 Background Yesterday, I wanna send a love letter to a chick who I am chasing on-line. So I decided to send this letter by my favorite email client GNUS in my favorite editor Emacs to show my passion and love, but sad things happened(Seriously, Should I still being single and lonely?) , I got following errors: My customized email signature corrupted, which supposed to attach a joke and an ASCII art. Following is the error message, if I sent those error message to a girl, I must be out the game, right? /bin/bash: fortune: command not found /bin/bash: cowsay: command not found I can not send emails in GNUS anymore. smtpmail-send-it: Sending failed: 530 5.7.0 Must issue a STARTTLS command first. y9sm60423107pas.10 - gsmtp Although I have another puzzle which can be classified as same kinds of problem, In eshell-mode, I can not found the right ...

Install GTK+-3.8.7 into Ubuntu 12.04 from scratch

Image
Install Gtk+-3.8.7 into Ubuntu 12.04 from scratch Table of Contents Preparation How the compile the source code from the beginning? 1 Preparation The first step is alway to download the needed package. I give the following shopping list: software package Download URL glib-2.36.4 http://ftp.gnome.org/pub/gnome/sources/glib/2.36/ gdk-pixbuf-2.28.2 http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.28/ atk-2.8.0 http://ftp.gnome.org/pub/gnome/sources/atk/2.8/ fontconfig-2.11.0 http://www.freedesktop.org/software/fontconfig/release/ harfbuzz-0.9.24 http://www.freedesktop.org/software/harfbuzz/release/ pango-1.34.1 http://ftp.gnome.org/pub/gnome/sources/pango/1.34/ libatk-bridge2.0 http://packages.ubuntu.com/zh-cn/quantal/libatk-bridge2.0-0 libatk-bridge2.0-dev http://packages.ubuntu.com/zh-cn/quantal/libatk-bridge2.0-dev gtk+-3.8.7 http://ftp.gnome.org/pub/gnome/sources/gtk+/3.8/ My operating system is Ubuntu 12.04 ...

How Bluetooth LE works? -- Host stack

Image
How Bluetooth LE works? – Host stack Table of Contents 1 Bluetooth LE hosts stack architecture 2 L2CAP 3 Attribute 4 The Attribute Protocol and The Generic Attribute Profile 1 Bluetooth LE hosts stack architecture +----------------------------------+ | | | Generic Attribute Profile | +----------------------------------+ | | | Attribute Protocol | +----------------------------------+ | | | L2CAP | +----------------------------------+ Bluetooth LE's host stack is built under the Host Control interface, which is used to connect with controller part. As showing in the above figures, there are at least three layers which need to introduce in...

Use readline library to built command line tools

Image
Use readline library to built command line tools Table of Contents 1 Why readline library? 2 How to use it? 1 Why readline library? As a Linux programmer, I always need to write some command line tools, with the help of GNU Readline library , this mission can be a snap. So what's the readline library gives for us, according to its official document? It provides a set of functions which allow users to edit command lines as they typed in. What's more, it also supports history recording and auto-completion. It is GNU software and is distributed under the terms of GPL license. 2 How to use it? I upload my source code, using the readline library, which implemented a silly command line tools with only two command inside – help and quit, but I can add another command easily in its framework. It support history recoding, which means you can browser the your command history by up/down keys, but it still cann't support command auto-completion(I will ad...

How Bluetooth LE works? -- Link Layer

Image
How Bluetooth LE works? - Link layer Table of Contents 1 Bluetooth LE system architecture 2 Bluetooth LE Physical layer 3 Bluetooth LE Link Layer states 4 Bluetooth LE Link Layer packets 1 Bluetooth LE system architecture This is the first post and hopefully a series of upcoming postings about Bluetooth Low Energy. Above figure is the protocol stack of a whole Bluetooth LE system. The Bluetooth LE is one part of Bluetooth v4.0 specification, it was designed not to pursue high transmission speed but for lower energy consumption. So the Bluetooth LE products can be powered by a button-cell battery for years. How did it do that? This article is a review of Robin Heydon's excellent book – Bluetooth Low Energy, the developer's handbook. Bluetooth LE is completely redesigned of classic Bluetooth protocol, It seems that both the Bluetooth LE and classic Bluetooth has the same architecture from above figure, but actually they are so different inside, an...

tts-mode for emacs update - support Mac OS X's tts engine

Image
tts-mode for emacs update - support Mac OS X's tts engine Table of Contents 1 Support Mac OS X's default tts engine 2 Configure and Install tts-mode 1 Support Mac OS X's default tts engine After I owned an Macbook air, I tried to port tts-mode into OS X system. I installed espeak command line tool into OS X, it works well just like in linux system. Thanks to the excellent portability of elisp source code, I need not to change any source code. I still have not installed festival tts engine into Mac OS, but it seems have many tutorials to do it. After that I found OS X's default tts engine, which provide an command line interface, has much clearer and greater fluency than both espeak and festival. So I wonder if I can support OS X's default tts engine. Then here it is, the new tts-mode . 2 Configure and Install tts-mode Reference the following codes: (add-to-list 'load-path "path/to/tts-mode" ) ;; configure tts engine...

Which storage cloud to choose?

Image
Dropbox, Box, Google driver, Ubuntu one or icloud ? Table of Contents 1 Storage in cloud products 2 My working environment 3 How Storage cloud improved my life? 4 Which product I like the most? 1 Storage in cloud products Now I wanna too share some good storage cloud products that I used in my daily work. A good storage cloud tool can offer you so much convenient in daily life and increase your productivity and efficiency at work. Here is my own experience with some cloud products. So, What is the storage cloud products? It is a services that can store your data into cloud and can share it everywhere. Here is the storage cloud services that I already used. free size OS compatibility GFW compatibility Dropbox 5G Linux, Mac, Windows OK Box 50G Mac, Windows OK Google Driver 15G Mac, Windows Need to fuck GFW ubuntu one 5G Linux(ubuntu), Mac, Windows OK icloud 5G Mac, Windows OK 2 My working environment Before to illustrate this question, I ...