Recent Notes
Displaying keyword search results 1 - 10
Created by voodoo on February 18, 2012 13:20:50
Last update: February 18, 2012 13:20:50
A detailed tutorial on iptables: Linux Packet Filtering and iptables
" This document was simply written to give everyone a good and simple primer at how to get started with iptables, but at the same time it was created to be as complete as possible. It does not contain any targets or matches that are in patch-o-matic for the simple reason that it would require too much effort to keep such a list updated. If you need information about the patch-o-matic updates, you should read the info that comes with it in patch-o-matic as well as the other documentations available on the Netfilter main page. "
Created by voodoo on February 16, 2012 14:57:35
Last update: February 16, 2012 14:57:35
You can use either declare or typeset to list function definitions :
To list all function names:
declare -F
To display a function definition:
$ declare -f quote
quote ()
{
echo ...
If you see a lot of functions with names starting with the underscore ( _ ) and wonder where they come from, they are created by the scripts in /etc/bash_completion.d/ .
Created by zhidao on January 25, 2012 19:27:53
Last update: January 25, 2012 19:28:47
The spring MVC annotation-driven declaration:
<?xml version="1.0" encoding="UTF-8"?> <beans x... does the following magic : Among others, registers: RequestMappingHandlerMapping RequestMappingHandlerAdapter ExceptionHandlerExceptionResolver in support of processing requests with annotated controller methods using annotations such as @RequestMapping , @ExceptionHandler , etc. Enables Spring 3 style type conversion through a ConversionService instance in addition to the JavaBeans PropertyEditors used for Data Binding. Enables support for formatting Number fields using the @NumberFormat annotation through the ConversionService . Enables support for formatting Date, Calendar, Long, and Joda Time fields using the @DateTimeFormat annotation, if Joda Time 1.3 or higher is present on the classpath. Enables support for validating @Controller inputs with @Valid , if a JSR-303 Provider is present on the classpath. Enables HttpMessageConverter support for @RequestBody method parameters and...
Created by zhidao on January 02, 2012 15:17:43
Last update: January 03, 2012 07:18:15
SCIM is needed to input Chinese in Ubuntu.
Install the needed packages:
$ sudo apt-get install scim-qtimm im-switch scim-p...
Goto "System Settings": click the "gear" icon at top right corner and select "System Settings..."
Click "Language Support"
Select scim for "Keyboard input method system"
Log out and log back in.
Switch between input methods with CTRL+Space
A list of available input methods is available from: http://www.scim-im.org/projects/imengines
Created by nogeek on December 30, 2011 13:25:28
Last update: December 30, 2011 13:57:37
By default, tomcat uses an enhanced java.util.logging implementation called JULI, which can be configured at two different levels: Globally, with the ${catalina.base}/conf/logging.properties file. Per web application, with WEB-INF/classes/logging.properties . The configuration file is a normal Java properties file: Logging handlers are specified with the handlers property.
handlers = 1catalina.org.apache.juli.FileHandler, ... The root logger can define its set of handlers using the .handlers property. .handlers = 1catalina.org.apache.juli.FileHandler,... A prefix may be added to handler names. The prefix starts with a digit and ends with a dot ( . ), for example: # 1catalina. is a prefix 1catalina.org.apache.j... System property replacement is performed for property values which contain ${systemPropertyName} . Each handler can have its own specific properties: 3manager.org.apache.juli.FileHandler.level = FINE ... Loggers can define their own...
Created by woolf on December 29, 2011 11:18:11
Last update: December 29, 2011 11:18:11
Use the expand command to extract files from a .cab file:
expand [-r] source [destination] [-d source.cab ... Option Description [-r] Renames expanded files. [destination] Specifies where files are to be expanded. If source is multiple files and -r is not specified, destination must be a directory. destination can consist of a drive letter and colon, a directory name, a file name, or a combination of any of these. [-d source.cab] Displays a list of files in the source location. Does not expand or extract the files. [-f:files] Specifies the files in a cabinet (.cab) file that you intend to expand. You can use wildcards (* and ?). source.cab Specifies the files to expand. source can consist of a drive letter and colon, a directory...
Created by Dr. Xi on December 07, 2011 13:51:13
Last update: December 07, 2011 13:51:13
To list all changed files under the current directory:
$ svn st
To list all changed files since revision 732:
$ svn diff -r 732:HEAD --summarize
To list all changed files since Dec 07, 2011:
$ svn diff -r {'2011-12-07'}:HEAD --summarize
To list all files changed after Dec 07, 2011 4:00pm:
$ svn diff -r {'2011-12-07 16:00:00'}:HEAD --summa...
To list all files changed since Dec 07, 2011 under the directory src :
$ svn diff src -r {'2011-12-07'}:HEAD --summarize
Created by Fang on December 05, 2011 13:04:11
Last update: December 05, 2011 13:04:11
Facelet requires strict XML syntax, so unmatched tags (start with no end, etc) generate errors. This is a trick to workaround that. The following code generates a row for every three items and for each row assigns a row id:
<!-- using ui:repeat -->
<ui:repeat var="name" ...
Created by Fang on December 05, 2011 12:41:21
Last update: December 05, 2011 12:41:21
Use the varStatus.first property and EL to assign a different CSS class for the first element:
<ui:repeat var="name" varStatus="status" value="#{...
Created by James on November 27, 2011 12:43:24
Last update: November 27, 2011 12:59:01
An easy to digest stylesheet example for XSLT for Atom. Simply list entry titles and summary:
<?xml version="1.0" encoding="utf-8"?>
<xsl:sty...
To show the first 3 items in atom feed:
<?xml version="1.0" encoding="utf-8"?>
<xsl:sty...