This is a continue to the first part in this post Emacs - Setting up environment for C/C++ Programming - Part 1. This time, I’ll demonstrate some more tips to help make your Emacs a powerful IDE for C/C++ programming

Syntax Checking on the fly

Flymake is a package which comes with Emacs 23 and above to help Emacs perform syntax checking as you type. It uses an external program (usually the compiler) to determine the errors.

Since it’s a part of Emacs 23, you don’t have to install in order to use it, just add this to your .emacs

(require 'flymake)
Read more

In this previous Emacs - Async File Copying in Dired using Rsync, I have demonstrated how to use rsync to replace the built-in Dired copy function. Today, I have improved that function so that rsync window will dislay progress separately from my currently working windows. Moreover, after finishing copying, it will show the message and automatically close the progress window after 5 seconds. Also, the rsync progress window can not be selected by call other-window. As a result, the rsync feature now does not affect my current work. I can continue what I’m currently doing while leaving rsync take care of my files.

Note: it would not run on Windows computers.

Implementation

This is the new code. Put it in your .emacs, replace with my old rsync function if you have already use it.

Update 8 Apr 2013: I have improved the code a little bit so that later it will be much easier for me to add new async function like moving, compressing,… Also, this time, you can run multiple rsync process.

Read more

Yesterday, I decided to buy my own domain to serve for my blog after months using github.com subdomain (http://tmtxt.github.com). It took me a little difficult to figure out how to setup my custom domain (bought from namecheap.com) for my old github blog. This is the steps how to config my current domain http://truongtx.me.

First you need to config the domain in your repo. Create a file name CNAME in your root directory of your blog. Insert your custom domain there, in my case it it truongtx.me. Save the file and push it to github.

Now open namecheap.com and login into your account and go to Domain management. Open Host Records to edit your domain to point to github. Follow the config in the picture below and then click Save. 204.232.175.78 is the ip of github server, you can find it in this page

namecheap

Read more

This blog post demonstrates how to config Google Analytics for Jekyll Bootstrap to monitor website view, user, traffic, etc. The manual on Jekyll Bootstrap site is not so clear and comprehensive for those who is new to Google Analytics and Jekyll Bootstrap.

Register for Google Analytics

First, you need to register a Google analytics account. Go to this link https://www.google.com/analytics/ and Sign In with your Google account. If this is the first time you use Google Analytics, it will ask you to create a new Google Analytics account. This is different from your Google account.

Select Website as the target that you want to track. After that, select Classic Analytics method.

Select

Read more
Simple Android TODO App
  •  04 April 2013
  •  misc 

Overview

This is a simple Task Management Application (To-do list manager). It helps you in managing and organize your daily works include what you need to do, when is the due date for the task, who will be involved in the activity, etc.

Read more

I really hate the “Reopen Windows when Logging back”” feautre in MacOS Lion and above. That feature exists because Apple wanted to integrate iOS into MacOS. However, my Macbook uses a HDD, not an SSD, so everytime I log into my computer, it automatically opens all those applications, which takes time and can make my computer run very slowly. Even though I have unchecked the “Reopen windows when logging back in” option in the Shutdown/Restart dialog, my Mac often reopen all my last running applications. I have to wait for all of those stuffs to completed open and then I can use my computer normally.

Restart Dialog

Read more

Update: I have implemented a better version of this code. The new version is able to display progress separately and auto hide the rsync window after finishing copying. You can look at this post Emacs - Async File copying with Rsync - Update

Emacs Dired mode is a great alternative for the default file explorer application on MacOS, Windows or other systems. That is because Dired mode provides with the ability to quickly navigate through files and directories, mark multiple files for later operation using keyboard. However, when dealing with large and multiple files, it show one annoying drawback. When we want to copy or move a big file, Emacs will be entirely blocked until the copying/renaming process complete.

Read more

Introduction

Emacs is an extremely extensibile and customizable text editor. We can customize nearly every aspect of it. Color theming, of course, is not an exception in Emacs. A good color theming can make us feel more pleasant and literally improves our work.

Since version 24, Emacs offers a powerful tool to create and maintain custom theme called customize-create-theme. It provides you an visual interface for interacting with all those facets as well as previewing color in Emacs. You can even copy from other theme and then customize it a bit to make it yours. Here is some tips on how to create a custom theme with Emacs 24.

Read more

Since Disqus is made for static site comment system, each Disqus thread is identified by the current page URL. This leads to a problem that Disqus does not understand that http://my-site/link/to/post and http://my-site/link/to/post/?fbxxx refer to the same article. The second link is caused by facebook sharing system. It automatically add the trailing to the links that shared on facebook. As a result, those 2 links are considered as 2 separate threads and will not display probably.

The solution for this is to normalize the URL of the site to make them all follow one convention. Because Jekyll sites are static websites, we need a language that can run on client. This can be solved by using javascript.

Read more