crond sends email notifications automatically. However, these emails are not needed. How to disabled it? If your command does not anything printed to STDOUT or STDERR, there is not emails send. You can redirect 2 and 1 to /dev/null at the end of your command. You can also set the MAILTO variable to empty by
Read more
Tag: Tutorial
How to allow pre tag in WordPress comments?
Posted onHow to allow pre tag in WordPress comments? You can add a filter hook for pre_comment_approved: <?php function filter_handler( $approved , $commentdata ) { // inspect $commentdata to determine approval, disapproval, or spam status return $approved; } add_filter( ‘pre_comment_approved’ , ‘filter_handler’ , ’99’, 2 ); ?> Reference: https://codex.wordpress.org/Plugin_API/Filter_Reference/pre_comment_approved
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
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 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 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 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 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 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
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 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 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.
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
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/
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 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 map Win key to Ctrl on Linux?
Posted onHow to map the Win key to another Ctrl on Linux? You can set it in gnome-tweak-tool in Gnome 3 by setting the “Alt/Win key behavior”:
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).
How to reset the keyboard set by xmodmap on Linux?
Posted onHow to reset the keyboard set by xmodmap on Linux? You can reset your keyboard settings by: setxkbmap or setxkbmap -option depending on the way the keyboard was set by xmodmap.
Classpath for compiling MapReduce jobs on Hadoop 2.2.0
Posted onHow to get the correct classpath for compiling MapReduce jobs on Hadoop 2.2.0 (YARN)? The yarn command from Hadoop 2 can find it out for you: yarn classpath You may add the full path to yarn which is under bin directory of the Hadoop distribution pachage, if it is not in your $PATH.