Bash comparison operators

Posted on

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

How to generate reference of web pages in the IEEE citation format with bibtex?

Posted on

How 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 the data replication factor of Hadoop HDFS?

Posted on

How 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

Direct multi-hop ssh connection

Posted on

How 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 change the mode for simplified Chinese or Traditional Chinese mode in ibus-libpinyin?

Posted on

How 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 on

Which 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 on

Where 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 rearrange Alt, Ctrl and Win keys on Linux: Win as Alt and Ctrl/Alt as Ctrl

Posted on

How 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 on

How 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).