How to change the audio track for .mkv files in mplayer? Key shortcut: # (dvd, mpeg, matroska, avi and libavformat only) cycle through the available audio tracks. tab (mpeg-ts and libavformat only) More: https://www.systutorials.com/b/linux/663/mostly-used-mplayer-keyboard-control/
Category: QA
Questions and answers.
Chrome reports “Adobe Flash Player was blocked because it is out of date.”
Posted onOn Linux (Fedora 17 x86-64), Chrome keeps reporting “Adobe Flash Player was blocked because it is out of date.” every time I browse a page that contains Flash. How to fix this? I did this and it turned to be working for me: Disable the libpepflashplayer in Chrome by run chrome://plugins/ in the URL bar.
Read more
How to merge a commit from another branch to my current branch in git?
Posted onI have 2 branches: dev and master. I have commits in dev like this: c0–>c1–>c2–>c3–>c4 Commits in master like this: c0–>c5–>c6 c2 and c3 fix a bug. Now, I want to merge commit c2 and c3 that fix the bug to the master branch, but I do not want to merge all the commits (e.g.
Read more
How to set up proxy over SSH on Windows?
Posted onThis tutorial teaches how to set up SSH proxy on Linux. How to set up one proxy over SSH on Windows? A tutorial of using SSH tunnel as the proxy on Windows is introduced here: https://www.systutorials.com/tutorial/4696/software/proxy-using-ssh-tunnel-on-windows/
How to find out those who do not follow me back on twitter
Posted onI want to find out those who I follow but do not follow me back on twitter. Is there a method to find out those who do not follow me back on twitter? A very useful tool: twitNERD can help you find out the ones that you follow but do not follow you. Additionally, you
Read more
Auto completion in Vim
Posted onHow to enable auto code completion in Vim, like in the IDE? Several plugins I use: snipMate: Plugin for using TextMate-style snippets in Vim omnicppcomplete: Plugin for C/C++ omnicompletion neocomplcache: Ultimate auto completion system for Vim
How to manage plugins for Vim?
Posted onThe Vim plugin directory under ~/.vim seems messy—a plugin has different files in different directories and the files from different plugins are put together. This is hard to add/remove plugins. Is there any better method for managing them? I use pathogen and am very happy with it. After installing pathogen, any plugins you want to
Read more
3 Ways of Making Case Insensitive Search in Vim/Vi
Posted onBy default, Vim/Vi’s search is case sensitive. However, if I want to search case insensitively, is there any method? For example, I search for dog, instead of matching dog only case sensitively, I also want to find out phases containing Dog, DOg, etc. There are several methods: 1. Setting the search to be case insensitive
Read more
How to revert a merge in Git
Posted onI merge a branch, say b1, from another branch, say b2. Both b1 and b2 have some commits. Say, b1: c1 —> c2 —> c3 b2: c1 —> c4 —> c5 Now, if I merge b2 to b1 and there is no conflicts, b1’s history includes b2’s commits (c4, c5). How to revert this merge
Read more
How to install php on Apache on Fedora?
Posted onHow to install php on Apache on Fedora? The basic support (basic PHP support, no caching, etc.) should be enough. First, install Apache2 (httpd): # yum install httpd Then, enable php support: # yum install php Remember to restart httpd after you install php: # service httpd restart
How to quickly find out failed disks’ SATA port in Linux? (how to map Linux disk names to SATA ports)
Posted onI find one disk failed on my server which have several ones installed. I know the disk’s name in Linux (e.g. sda, sdb). However, the Linux disk name to SATA port mapping does not follow the same order. Now, I want to find out the failed disks. How to quickly find out them and which
Read more
svn: how to clean up my repository directory?
Posted onI have a local svn repository. I work in the repository, e.g. compiling latex documents and building software packages, and there are many useless temporary files there. How can I clean it up by automatically clean these temporary files like the git clean -f in git? svn seems has no built-in function for this. But
Read more
Make changes to sysctl.conf take effect without rebooting Linux?
Posted onI made some changes to /etc/sysctl.conf. I know it will take effect next time Linux boots. However, how to make the changes to sysctl.conf take effect without rebooting Linux? You can force Linux to reload the new configuration in /etc/sysctl.conf by: execute the following command as root: sysctl -p For more details, check the manual
Read more
.htaccess: How to disable directory listing?
Posted onHow to disable directory listing using .htaccess? The webserver (Apache) should allow downloading files in a directory and child directories of it but forbid listing of the directory and child directories. In the directory that you want to disable directory listing, create the .htaccess file that contains: Options -Indexes You can also done by Options
Read more
How to install the caption latex package on Fedora?
Posted onI got a message: Package subcaption Error: `caption’ package not loaded I guess that I should install the cpaton package. How to install the caption latex package on Fedora? Fedora 19 is already shipped with the latex Tex Live 2013. You can directly install it by yum. # yum install texlive-caption For older Fedora releases,
Read more
Subversion: How to revert my changes in my local copy of the repository?
Posted onI made some changes in my local copy of the svn repository. I have not committed and updated the server yet. Now I want to discard my updates. How to revert my changes in my local copy of the repository? To discard current updates, run this in the root directory of the repository: svn revert
Read more
WordPress: how to list a page’s child pages
Posted onHow to list a page’s child pages in WordPress? wp_list_pages can list the sub pages of a page. Check this code (also include the HTML that wraps it as an example): <h3>Pages under <?php the_title(); ?></h3> <div class=”entry”> <ul> <?php global $id; wp_list_pages(“title_li=&child_of=$id&show_date=modified &date_format=$date_format”); ?> </ul> </div>
How to install and configure a MySQL cluster on CentOS/RHEL 6.3?
Posted onAny good tutorial on how to install and configure a MySQL cluster on CentOS/RHEL 6.3? Check these posts: Installing MySQL Cluster on CentOS 6.3Configuring the MySQL Cluster General tutorials: MySQL Cluster Installation and CentOS 6: Install MySQL Cluster – The Simple Way.
Set the image size in markdown syntax
Posted onWhen I add an image in editor using the markdown syntax, I want to control the size of the image to display instead of its original size. How should I do this? As far as I know, the syntax of markdown currently does not support setting the size of image. If you want to set
Read more
Git: setting a local branch’s upstream tracking branch
Posted onHow to set a local branch’s upstream tracking branch in git? For example, I want to track remote repository ‘origin’ ‘s branch ‘demo’ with the local ‘demo’ branch. You can set tracking information for the current branch (say cur_branch) of upstream branch (say also cur_branch) in remote repository origin with: git branch –set-upstream cur_branch origin/cur_branch