This 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/
Tag: Tutorial
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
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
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
.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.
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
How to make a swap partition
Posted onHow to make a swap partition on Linux? First, make a new partition (or reuse an existing one if you like). I suggest using cfdisk to create it: https://www.systutorials.com/docs/linux/man/8-cfdisk/ Then, turn the new partition (say, /dev/sdc1) to a swap # mkswap /dev/sdc1 Lastly, turn it on # swapon /dev/sdc1 You can check whether its status
Read more
Setting Swap Priority in Linux
Posted onHow to set swap priority in Linux? Can I use 2 swap partition at the same time? You can set the priority of swap in Linux by swapon. For example, to set /dev/sdc1‘s priority to 0: # swapoff /dev/sdc1; swapon -p 0 /dev/sdc1 You can also put one entry into the /etc/fstab to make it
Read more
How to write a autostart script for gnome
Posted onI want to automatically run a program when I log in gnome. How to write a autorun script for it? Here is one example: $ cat ~/.config/autostart/dropbox.py.desktop [Desktop Entry] Comment[en_US]= Comment= Exec=/home/zma/bin/dropbox.py start GenericName[en_US]= GenericName= Icon=system-run MimeType= Name[en_US]= Name= Path= StartupNotify=true Terminal=false TerminalOptions= Type=Application X-DBUS-ServiceName= X-DBUS-StartupType= X-KDE-SubstituteUID=false X-KDE-Username= To set up a new one, you
Read more
How to make the video play in background in iPhone?
Posted onEach time I play a video and lock the iPhone by pushing the power button, the video is automatically stopped. If I want to play a MTV and just listen to the music when I walking, I’d like the video play in the background. Is there a method to make this happen? I can do
Read more