I/O Microscopy: Tasks’ Disk I/O Information with High Accuracy

Abstract Most popular task monitor systems (such as top, iotop, proc, etc) can only get tasks’ disk I/O information like tasks’ I/O utilization percentage every seconds due to kernel timer/tick frequency and high time cost of system interfaces. This article presents I/O Microscopy, a new way to get tasks’ disk I/O information with high accuracy. Experiments show that I/O microscopy can filter out I/O intensive tasks effectively. » Read more

How to Disable and Enable Laptop Keyboard in Linux

Attaching a USB keyboard to a laptop is common when using a laptop because a normal keyboard may provide a more convenient typing experience. The laptop keyboard is not used in these situations. However, the laptop keyboard may still be touched by accident. In this post, we will discuss how to disable and enable the laptop keyboard in Linux. I will also provide scripts ready for you to directly use them for disabling/enabling the laptop keyboard. » Read more

How to Configure the Latest Version of Flash on Firefox for Linux: by the Fresh Player Plugin

As you may know, Adobe stopped supporting the NPAPI version of Flash on Linux and the latest NPAPI version of Flash player at version 11.2 released back in 2012 will only receive security fixes. Even the security fixes to the 11.2 version of the Flash Plugin your Firefox is using will end on May 4, 2017, five years from the release date. » Read more

Git Merging FAQs

git merge is frequently used during development of projects managed by git. There are many common questions about git merge and I find most are solved and discussed on StackOverflow. Here, I summarize useful ones so that others who want to learn git merge need to do the search again. Merge, rebase, fast forward and conflicts ∞ Differences between git rebase and git merge. » Read more

Cheatsheet: Git Branching with a Git Server

It is common to set up git servers to host git repositories. Branching is lightweight in git and a very friendly mechanism to manage code. Here, I summarize a cheatsheet of common git branching commands for working on repositories from a git server. This post assumes that you have basic knowledge with git. If you are not familiar with git, you may want check Howto for New Git Users first. » Read more

Howtos for Git Submodule Commands (A Quick Git Submodule Cheat Sheet)

git submodule is a very useful tools in git to include other git repositories in one repository to handle cases such as library dependencies. In this post, I summarize some commonly used commands that I find useful for working with git submodule. For the list of full commands, check the git submodule manual. Git.png Add a submodule ∞ To add a submodule, if it is the first time (that is, no submodule in the repository yet), under the root directory of the repository, run git submodule init git submodule status git submodule add -f git@example.com/the-repo ./the-repo which will add the new repository to ./the-repo. » Read more

Git through SSH Tunnel as Proxy

git is a great tool and it is common to have a git server over SSH possibly managed by gitolite. However, there are situations that we can not directly connect to the git server but be able to SSH to another node that can connect to the git server. The git server may allow only internal connections because of security. With the node that we can SSH to, we can still use the git server “directly” by setting up a SSH tunnel as a proxy for the git connection. » Read more

Vim Howtos and Tips

Vim is a fast and handy editor on *nix systems. Like Emacs, Vim has a steep learning curve as you get constantly get new things. However, the effort deserves it as you efficiency is highly improved. Here, I summarize the tips and howtos I learned using Vim. Some previous posts on vim are tagged with vim. My .vimrc and .vim file ∞ My .vimrc and .vim files: https://github.com/zma/vim-config How to use these files ∞ cd /path/to/vim-config/ git submodule update --init If you never configured Vim: cd ln -s /path/to/vim-config/.vimrc ./ ln -s /path/to/vim-config/.vim ./ If you ever configured your Vim, you may need to merge my configurations to yours. » Read more

Setting Up Git Commit Email Notifications

A method to send email notification to a list of email addresses by the remote git server after every push from the client will be introduced in this post. An example notification email after a commit is shown in the figure below. The subject contains a prefix, the repository name, the branch name and the last commit message. The body of the email contains a summary of the changes and the commit log. » Read more

How to Set Up A Gitolite Git Server – A Ten-Minute Tutorial

I ever introduced seting up git server using SSH or gitosis. However, gitolite is the way to go for managing git servers if you want an lightweight authentication layer. gitolite provides many very usefull features which can control each user’s right on each branch. I set up one gitolite git server and am very happy with it. In this post, let’s look at how to set up one gitolite git server. » Read more

Linux UDP Programming Tutorial

UDP has its advantages over TCP, such as being relatively lightweight and receiving one packet per read call (recvmsg), although the programmers need to handle related issues, such as packet lost and out-of-order packets delivery. This post gives information and references on how to write UDP programs in a C/Linux environment. What is UDP ∞ Check the wikipedia article on UDP User Datagram Protocol for a brief overview. » Read more

Howto for New Git Users

This post is a tutorial for new users to set up git and clone and use the first repository. This post introduces how to start using git for new users. This post does not introduce details of how to use git commands. Please refer to the git manual or other tutorials for how to commit, push, etc. In this post, we introduce how to set up keys for git, how to configure non-standard SSH port for git, and how to use the first git repository. » Read more

How to Revert Changes in Git

We make mistakes when developing before or after committing in git. We may revert changes and fix our mistake by using git. Revert entire working tree before committing We can return the entire working tree to the last committed state if we mess up the working tree: $ git reset --hard HEAD Revert changes to particular file before committing We can directly revert the changes to particular file before committing the changes. » Read more

Git Solutions

Solutions to git server construction and management are summarised in this post. The post is keeping updating while new solutions is added to this site. Set up git server How to Set Up A Gitolite Git Server – A Ten-Minute Tutorial Setting Up a Git Server Using Gitosis Howto: Git Server over SSH Git repositories management Managing Repositories on Git Server Using Gitosis Setting Up Git Commit Email Notifications Use Git Howto for New Git Users Git Merging FAQs How to Revert Changes in Git Git Submodule Cheat Sheet Cheatsheet: Git Branching with a Git Server Git through SSH Tunnel as Proxy » Read more

Jailbreaking Apple iPod Touch with Spirit in Linux

How to jailbreak Apple iPod touch in Linux will be introduced in this article. We use Spirit to jailbreak iPod touch. Spirit[1] is an untethered jailbreak for iPad, iPhone, and iPod touch on certain firmware versions. Please read [1] for requirement when using Spirit. Currently, the version of iTunes used should be iTune 9 earlier than 9.2. The firmware’s version should be 3.1.2, 3.1.3 or 3.2. » Read more

How to Backup Linux Home Directories Using rsync

I need to backup my Linux home directory to one of my portable hard disk. I tried to use git, but failed since git doesn’t support large file (I failed after many tries, I have file larger than 5G). I find rsync, the fast, versatile, remote (and local) file-copying tool and I am happy with it now. rsync is very fast especially the change is incremental. » Read more

My Vim Emacs and Other Configuration Files

My .vimrc .emacc files can be downloaded from here: http://github.com/zma/config_files My text editors are especially configured for source code such as C/C++/shell editing. I prefer to use spaces instead of tab. And my favourite tab size is 4. Some vimrc parameters and the comments are listed here. Details and the updated configuration files please refer to the git repository. The .vimrc: set number " show line number set backup " keep a backup file set backupdir=~/.vibackup " keep all backup files in one central dir set backupcopy=yes set tabstop=4 set shiftwidth=4 set expandtab set autoindent " always set autoindenting on set cindent " indent c code syntax on set incsearch " do incremental searching set hlsearch " high light the search content set history=50 " keep 50 lines of command line history set ruler " show the cursor position all the time set showcmd " display incomplete commands This xstartup configuration files makes VNC to use gnome as the desktop environment of remote server instead of the default (twm). » Read more

Setting Up a Git Server Using Gitosis

Update: Since gitosis is not maintained and supported, please check out gitolite for setting up a new git server. (see the comment from Sitaram Chamarty, the gitolite author, the author of gitolite.) Gitosis is a piece of software writen by Tommi Virtanen for hosting git repositories. It manages multiple repositories under the same user account. It uses SSH public keys to identify users. » Read more