What are all the bash supported comparison operators? The man 1 test contains all the operators supported in bash. An omitted EXPRESSION defaults to false. Otherwise, EXPRESSION is true or false and sets exit status. It is one of: ( EXPRESSION ) EXPRESSION is true ! EXPRESSION EXPRESSION is false EXPRESSION1 -a EXPRESSION2 both EXPRESSION1
Read more
Author: Eric Ma
Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.Generating TAGS file for Emacs recursively?
Posted onHow to generating TAGS file for Emacs recursively? etags seems not support recursively generating TAGS file. I use ctags instead. It can also generate TAGS file for Emacs with the -e option: ctags -e -R . You can also use etags with find: find ./ -print | xargs etags But I prefer the ctags way.
How to aggregate multiple RSS feeds to a single one?
Posted onHow to aggregate multiple RSS feeds to a single one? If you want a program to construct a web service by your own, SimplePie may be a good choice. It is written in PHP. If you just want a tool to make work done, I suggest Yahoo Pipes which works really well for me. (Yahoo
Read more
How to view DVI files on Linux?
Posted onHow to view the DVI files generated by latex on Linux? It seems evinece can not open it. After install the evince-dvi package, evince should be able to view dvi files: # yum install evince-dvi
How to find which files are opened by a Linux program?
Posted onHow to find which files are opened by a Linux program? For example, when I run cat ~/.bashrc, how to find out which files are opened by cat? You can achieve this by using strace if the program “open” files using system calls. For example, I run as this: strace -o /tmp/st cat ./.bashrc grep
Read more
How to generate reference of web pages in the IEEE citation format with bibtex?
Posted onHow to generate reference of web pages in the IEEE citation format with bibtex? From the IEEE Citation Reference, the reference for web page is like this: WWW Basic Format: [1] J. K. Author. (year, month day). Title (edition) [Type of medium]. Available: http://www.(URL) Example: [1] J. Jones. (1991, May 10). Networks (2nd ed.) [Online].
Read more
How to set up the Java environment in Linux?
Posted onI am using Fedora 20. I installed the rpm from Oracle for the Oracle JDK. How to set up the environment so that the Java environment is Oracle JDK instead of the OpenJDK? The Oracle JDK is install to /usr/java/ directory. On my Fedora 20, it looks like this: $ ls /usr/java -l total 4
Read more
Maximum size of S3 objects?
Posted onWhat is the maximum size of objects that I can store on Amazon S3? Now (Apr. of 2014), the limitation is 4TB. Before, Dec. 2010, it was 5GB. Reference: http://aws.typepad.com/aws/2010/12/amazon-s3-object-size-limit.html But be aware that the 10,000 part limit still applies.
How to set the data replication factor of Hadoop HDFS?
Posted onHow to set the data replication factor of Hadoop HDFS in Hadoop 2 (YARN)? The default replication factor in HDFS is controlled by the dfs.replication property. The value is 3 by default. To change the replication factor, you can add a dfs.replication property settings in the hdfs-site.xml configuration file of Hadoop: <property> <name>dfs.replication</name> <value>1</value> <description>Replication
Read more
How to balance the two columns of text on the last page of a Latex doc?
Posted onHow to balance the two columns of text on the last page of a Latex doc? 2 good Latex packages are good at balancing the two columns of text on the last page of a Latex doc (choose either one that are good for you). balance Usage: At the beginning of the doc: usepackage{balance} At
Read more
How to improve MPlayer video quality?
Posted onHow to improve MPlayer video quality by selecting a “better” video rendering/filter? You can choose a different video filter. I use hqdn3d which gives me the best quality. Be careful on machines with low CPUs. To use hqdn3d, put this line into your ~/.mplayer/config: vf=hqdn3d Check more options of video filters in MPlayer manual.
How to force MPlayer to start a video at the center of the screen?
Posted onHow to force MPlayer to start a video at the center of the screen? I assume you are using Linux. Put this line into your ~/.mplayer/config: geometry=50%:50% Check more options in MPlayer manual.
Direct multi-hop ssh connection
Posted onHow to use multi-hop ssh connection without needs to ssh multiple times? As a example, you are connecting to server.example.com through proxy.example.com from laptop.example.com as follows: laptop —-> proxy —-> server 2 possible methods: Method 1: Use the similar method as in Directly SSH to hosts using internal IPs through the gateway. Add this to
Read more
How to improve ssh/scp performance on Linux?
Posted onssh/scp are convenient and handy tools on Linux. Is is possible to further improve its speed/performance? Please check this post for how to improve ssh/scp performance: https://www.systutorials.com/5450/improving-sshscp-performance-by-choosing-ciphers/
How to change the mode for simplified Chinese or Traditional Chinese mode in ibus-libpinyin?
Posted onHow to change the mode for simplified Chinese or Traditional Chinese mode in ibus-libpinyin? What is the shortcut like “Ctrl+.” for switching full width or half width punctuation. Use shortcut “Ctrl + Shift + F”. In ibus-pinyin version 1.3.7, this shortcut is added: 2010-05-28 ibus-pinyin 1.3.7 stable release Add Ctrl + Shift + F to
Read more
Good introductions to Hadoop 2.0 (YARN)?
Posted onWhich ones are recommended introductions to Hadoop 2.0 (YARN)? Pointers to webpages are good. Those are good ones that I find: The SoCC13 paper “Apache Hadoop YARN: Yet Another Resource Negotiator” by Vinod Kumar Vavilapalli et al.: http://www.socc2013.org/home/program/a5-vavilapalli.pdf The introduction from Hortonworks by Arun Murthy:http://hortonworks.com/blog/apache-hadoop-yarn-concepts-and-applications/ The “Official” one from Apache Hadoop website (very brief):https://hadoop.apache.org/docs/r2.2.0/hadoop-yarn/hadoop-yarn-site/YARN.html
Hadoop 2 (YARN) default configuration values
Posted onWhere to check the default Hadoop 2 (YARN) configuration values for: HDFS: hdfs-site.xml YARN: yarn-site.xml MapReduce: mapred-site.xml Default Hadoop 2 (YARN) configuration values for Hadoop 2.2.0 from Apache Hadoop website: HDFS: http://hadoop.apache.org/docs/r2.2.0/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml YARN: https://hadoop.apache.org/docs/r2.2.0/hadoop-yarn/hadoop-yarn-common/yarn-default.xml MapReduce: https://hadoop.apache.org/docs/r2.2.0/hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml
How to convert a latex document with figures to a HTML file?
Posted onHow to convert a latex document with figures to a HTML file? htlatex (On Fedora, it is in the package texlive-tex4ht) can generate the html from a latex doc better than latex2html. From my experience, it can produce a better html file.
How to rearrange Alt, Ctrl and Win keys on Linux: Win as Alt and Ctrl/Alt as Ctrl
Posted onHow to rearrange Alt, Ctrl and Win keys on Linux: Win as Alt and Ctrl/Alt as Ctrl? On Linux, the Win key is seldom used. Mapping the Alt keys which are close to my thumb is damn convenient for Emacs users. Hence, the keyboard at the bottom line would look like: ———————————————————— |Ctrl|Alt|Ctrl| Space Bar
Read more
Add header footer in directory listing in Apache (httpd)
Posted onHow to add header footer in directory listing in Apache (httpd)? In the web directory’s .htaccess file: Options +Indexes IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8 HeaderName /header.html ReadmeName /footer.html IndexIgnore header.html footer.html .htaccess header.html and footer.html are under the website root directory (not the Linux root).