Wednesday, December 24, 2014

Macbook Pro setup
===========================

Configure Keyboard
———————————————————————

Download the Fr-Ca
Copy:
cf.icns and cf.keylayout
To:
/Library/Keyboard
In the .profile:
# .profile
bash

In the ".bashrc" file, you can add...

To add the time/date in the history:
HISTTIMEFORMAT="%d/%m/%y %T "

Shortcut for "ls -l":
alias ll='ls -l'

Modify the prompt:
export PS1="\n\u@\h \w\n$ "

Add magic to the space !cmd ...

bind Space:magic-space

Monday, December 22, 2014

Configure IntelliJ


Remove some files from the projet view
File -> Settings -> File Types :
Ignore files and folders

...;.surefire-*;*.iml;.idea;.gitignore


Plugins
CheckStyle-IDEA
String Manipulation
Copy on steroids - http://plugins.jetbrains.com/plugin/7198
Markdown
Lombok

Sunday, November 2, 2014

HTML report for unit tests

# Run tests and generate .xml reports
mvn clean test

# Convert .xml reports into .html report, but without the CSS or images
mvn surefire-report:report-only

# Put the CSS and images where they need to be without the rest of the
# time-consuming stuff
mvn site -DgenerateReports=false

Go to target/site/surefire-report.html for the report.

Terminal code \E?1034h

When  I was working with cqlsh (the command line client for Cassandra database), I tried to create a cleanup script which execute some CQL delete queries.  It turns out, the cqlsh client is a python-based command line client and it could generate a special code, a shell escape sequence (\E[?1034h).
I found more inforation here.


Wednesday, October 22, 2014

Libraries / frameworks


Java libs
JHipster
Spring Boot
Metrics
Logback
Ehcache
Jersey


Java Tools
Maven (plugins: surefire, surefire-reportassembly, antrun, javadoc, sourcecheckstyle, eclipse, help)
Ant
Tomcat / Jetty
Eclipse / IntelliJ

JavaScript
AngularJS
KnockoutJS
Deck.js
highlight.js

JavaScript Tools / Node.js
GruntJS
Bower
Karma
NodeJS
Jasmine
Mustache
UnderscoreJS
Firebug

CSS
SASS
LESS

CSS Tools
Compass


API References
JavaScript
Graphite


Google account


At job, if you want to keep your bookmarks & chrome plugins in sync between different computers, but you don't want to mix them with your personal account, just create a Google Account with your professional email address.

Monday, September 22, 2014

Java - OWASP ESAPI

The standard library for security is ESAPI from the OWASP fondation.

The OWASP Enterprise Security API GitHub repositories:

https://github.com/ESAPI/esapi-java
https://github.com/ESAPI/esapi-java-legacy

Thursday, July 10, 2014

windows - Sync left pane in Explorer with opened folder

Click on an empty space on the left pane, enable: "Show all folders" and "Expand to current folder"

Source

Monday, July 7, 2014

bash - history sharing between sessions


# .bash_rc
HISTSIZE=9000
HISTFILESIZE=$HISTSIZE
HISTCONTROL=ignorespace:ignoredups

history() {
  _bash_history_sync
  builtin history "$@"
}

_bash_history_sync() {
  builtin history -a         #1
  HISTFILESIZE=$HISTSIZE     #2
  builtin history -c         #3
  builtin history -r         #4
}

PROMPT_COMMAND=_bash_history_sync


history() overrides the original function to make sure that the history is synchronised before it is printed, so the numbers match.

Source | cheat sheet (pdf) | Nice article


Wednesday, June 25, 2014

Windows - Track and kill the right process

If you try to delete a file/folder and Windows stop you, because there's alread an other process which lock it, then you can use Process Explorer to track and kill that process.

  1. Download & Install Process Exploerer
  2. Find -> Find Handle or DLL ...
  3. Insert the path of the file in "Handle or DLL substring:"
  4. Click the "Search" button

bash - customizing

In the ".bashrc" file, you can add...


To add the time/date in the history:
HISTTIMEFORMAT="%d/%m/%y %T "

Shortcut for "ls -l":
alias ll="ls -l"

Shortcut for a fast maven clean build:
alias mvnci="mvn clean install -DskipTests -Dcheckstyle.skip=true"

Modify the prompt:
export PS1="\n\u@\h \w\n$ "

Always activate the color in grep:
export GREP_OPTIONS="--color"

Add magic to the space !cmd ...
bind Space:magic-space

Result:

__________________________.bashrc __________________________
# .bashrc
HISTTIMEFORMAT="%d/%m/%y %T "
export PS1="\n\u@\h \w\n$ "
export GREP_OPTIONS="--color"
alias ll='ls -l'
alias mvnci="mvn clean install -DskipTests -Dcheckstyle.skip=true"
bind Space:magic-space
__________________________.bashrc __________________________

Extra
To show line numbers in vi, modify the .vimrc (once inside vi, you can disable it if you want to copy the line without the number with: ":set number!"):
set number

Tuesday, May 13, 2014

SVN - Credentials for corporate proxy

There a simple way to add the credentials to the svn client:

%appdata%\Subversion\servers 

http-proxy-host=proxy-corpo 
http-proxy-port=80 
http-proxy-username=username 
http-proxy-password=password

ssh - Reusing connections [external link]

Basic configuration to reuse ssh connections with OpenSSH v4:
www.revsys.com/writings/quicktips/ssh-faster-connections.html

ssh - Tunneling [external link]

Basic tutorial to create a ssh tunel:
www.revsys.com/writings/quicktips/ssh-tunnel.html

Linux - Dual boot Windows 7 / Ubuntu [external link]


Step by step tutorial to install a dual boot:
www.dedoimedo.com/computers/dual-boot-windows-7-ubuntu.html

Friday, April 18, 2014

Maven - Start a new java project

mvn archetyp:generate
Group, ArtefactId, Version

mvn eclipse:eclipse

Then in Eclipse, you can import the Project:
File > Import > Maven > Existing Maven Projects > Next > Browse to the Root Directory > Select the pom.xml > Finish

Or you can create the Maven project directly in Eclipse:
File > New > Other... > Maven > Maven Project > Next > Next :
Group, ArtefactId, Version

Wednesday, April 16, 2014

XSLT - Definitions

XSLT - a language for transforming XML documents 
XPath - a language for navigating in XML documents 
XSL-FO - a language for formatting XML documents
XQuery - a language for finding and extracting elements and attributes from XML documents.

SQL - First and last day of the month

-- First day of the last month
SELECT DATEADD(mm, DATEDIFF(m,0,GETDATE())-1,0);

-- Last day of the last month
SELECT DATEADD(d,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())  ,0));

SQL - Mixing INNER and OUTER Joins [external link]

When mixing INNER and OUTER joins, it's important to understand the risks involed and this article describe it very clearly:
http://weblogs.sqlteam.com/jeffs/archive/2007/10/11/mixing-inner-outer-joins-sql.aspx

SVN > XSLT = HTML Report

svn log -v --xml file:///C:/subversion/repo/http-conf | xsltproc svnstyle.xsl - > ./svnlog.html

===== svnstyle.xsl =====
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
   <body>
      <h2>SVN Log</h2>
      <table border="1">
      <xsl:for-each select="log/logentry">
         <xsl:if test="author='USERNAME'">
            <tr>
               <td><xsl:value-of select="date"/></td>
               <td><xsl:value-of select="author"/></td>
               <td><xsl:value-of select="msg"/></td>
            </tr>
         </xsl:if>
      </xsl:for-each>
      </table>
   </body>
</html>
</xsl:template>
</xsl:stylesheet>
===== svnstyle.xsl =====


Output: 
===== svnlog.html =====
<html>
   <body> 
      <h2>SVN Log</h2> 
      <table border="1"> 
         <tr> 
            <td>2014-04-11T21:34:31.836671Z</td> 
            <td>
USERNAME</td> 
            <td>My third commit</td> 
         </tr> 
         <tr> 
            <td>2014-04-11T21:34:31.586674Z</td> 
            <td>
USERNAME</td> 
            <td>My second commit</td> 
         </tr> 
         <tr> 
            <td>2014-04-11T21:34:31.024182Z</td> 
            <td>
USERNAME</td> 
            <td>My first commit</td> 
         </tr> 
         <tr> 
            <td>2014-04-11T21:34:30.149193Z</td> 
            <td>
USERNAME</td> 
            <td>Creating the project</td> 
         </tr> 
      </table> 
   </body>

</html>
===== svnlog.html =====


Sunday, April 13, 2014

Friday, April 11, 2014

dos2unix


To convert all the files :
find . -type f -print0 | xargs -0 dos2unix

To convert all the files except those in the « .svn » directories :
find . -type f -not -iwholename '*.svn*' -print0 | xargs -0 dos2unix 

Cygwin - Install (Windows)


www.cygwin.com

Add modules:
- dos2unix (Utils \ dos2unix)
- xsltproc (Libs \ libxslt)
- wget (Web \ wget)
- curl (Net \ curl)
- nc (Net \ nc)
- git (Devel \ git)
- svn (Devel \ subversion)
- ssh (Net \ openssh)
- scp (Net \ openssh)
- openssl (Net \ openssl)

Thursday, April 3, 2014

Request forwarding based on HTTP Header

HTTP Proxy example:


<VirtualHost 1.2.3.4:80> 
   ServerName dynamic-proxy.company.com 
   DocumentRoot "/application/web_server/root" 
   CustomLog logs/dynamic-proxy.access_80.log combined env=!nolog 
   ErrorLog logs/dynamic-proxy.error_80.log 

   RewriteEngine on 

   <Directory /application/web_server/root> 
      Order Deny,Allow 
      Allow from all 
   </Directory> 

   AddDefaultCharset UTF-8
    
#################################################################################
#                                        Server #1
#################################################################################

   RewriteCond /application/web_server/srv01/%{HTTP:x-msisdn} -f 
   RewriteRule ^/root/(.*)$ http://srv01.int.company.com/root/$1 [L,NE] 

#################################################################################
#                                        Server #2
#################################################################################

   RewriteCond /application/web_server/srv02/%{HTTP:x-msisdn} -f 
   RewriteRule ^/root/(.*)$ http://srv02.int.company.com/root/$1 [L,NE] 

################################################################################# 
#                                        Server #3
#################################################################################

   RewriteCond /application/web_server/srv03/%{HTTP:x-msisdn} -f 
   RewriteRule ^/root/(.*)$ http://srv03.int.company.com/root/$1 [L,NE] 

#################################################################################
#                                        DEFAULT 
#################################################################################

   RewriteRule ^/root/(.*)$ http://prd01.int.company.com/root/$1 [L,NE] 

   # Avoid Cross Site Scripting 
   RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) 
   RewriteRuLe .* - [F] 
</VirtualHost> 

Monday, March 17, 2014

Find path

Linux/UNIX/Mac OS X:
$ which java

Windows XP
for %i in (java.exe) do @echo.   %~$PATH:i

Windows since 2003
where java

Tuesday, February 4, 2014

bash

Comment = '#'
Shell   = '$'
Output  = '>'

## Print Working Directory
$ pwd


## Change Directory: to /directory
$ cd /directory
# Examples:
>/directory
# Change Directory, from: /directory to /
$ cd ..
>/
# Change Directory: previous directory
$ cd - 
# Change Directory: go to home
$ cd
# Or
$ cd ~
>~


## Display output one screen at a time
$ less file
$ more file


## Concatenate and print (display) the content of file(s)
$ cat file1
# Or
$ cat file1 file2
# Examples:
$ cat File1.txt File2.txt > union.txt
$ sort -u File1.txt File2.txt > unique_union.txt
# Put the contents of a file into a variable
$ my_variable=`cat File3.txt`


## Create a test file
$ echo "test" > test.txt


## Filename and Directory Completion
$ cd /opt/I[TAB]
> cd /opt/IBM
$ cd /opt/IBM[TAB][TAB]
>IBM/         IBMinvscout/


## List of Variablenames
$ $[TAB][TAB]


## Variablename Completion
$B[TAB]
>$BASH


## Print variable's value
$ echo $BASH_VERSION
> 4.2.45(1)-release


## Username's list
$ cd ~[TAB][TAB]


## Hostname's list
$ ssh @[TAB][TAB]


## Run a command script in the current shell
$ ./download-logs.sh


## Search the user's $path for a program file
$ which ssh
>/usr/bin/ssh


## Copy one or more files to another location
$ cp f1 f2


## Move or rename files or directories
$ mv old_name new_name


## TAR + GZIP
$ tar -czvf archive.tgz files/


## Create a symbolic link to a file or a directory
$ ln -s [OriginalSourceFile] [NewLinkFile]


## Change access permissions
# http://ss64.com/bash/chmod.html
$ chmod access file
# Examples:
$ chmod u+x script.sh
$ chmod a-x file
$ chmod go+rw file
# Read by owner
$ chmod 400 file
# Allow everyone to read, write, and execute file
$ chmod 777 file


## Change file owner and group
$ chown [user] [filename]
# Examples:
# Owner => root
$ chown root file
# Group => admin
$ chown :admin file
# Owner => root AND Group => admin
$ chown root:admin file


## Change group ownership
$ chgrp [group] [filename]
# Examples:
$ chgrp oracle /usr/database


## Change file timestamps
$ touch filename
# Exemples:
$ touch -d "2 hours ago" filename
$ find DIRECTORY -exec touch -d "2 hours ago" {} +
$ find /opt/phantomjs/tomcat/apache-tomcat-6.0.37/logs/ -type f -mtime +30 -exec rm -f {} \;


## Find a specific file
$ find . -type f -name log4j*
# Examples:
# Fin a file and change the modification date
$ find DIRECTORY -exec touch -d "2 hours ago" {} +


## Reload shell configurations
$ source ~/.profile
# Or
$ source ~/.bashrc


## Exceute last command starting by 'command'
$ !command


## Remote connection with SSH
$ ssh user@hostname
>password


## Copy a remote file
# Push:
$ scp location user@othermachine.com:destination
# Pull:
$ scp user@othermachine.com:location destination
# The '-r' parameter is used to copy an entire directory, or you may use * to match on multiple files/directories.


## Find a command from the history
$ history | grep command


## Maven
$ mvn clean package
## SVN
#Checkout
$ svn co https://sasvnd1.int.videotron.com/svn/...
# Update
$ svn up
## Delete a file
$ rm file
# Delete many files starting with the letter f
$ rm f*
# Delete a directory
$ rm -r directory


## Debug Apache/IHS configurations
httpd.exe -e debug -k start
# Restart Apache/IHS with new configurations
$ httpd.exe -k restart


## head & tail
# Print the first lines of a file (default: 10 lines)
$ head -100 file.log
# Print the last lines of a file (default: 10 lines)
$ tail -100 file.log
# Extract lines 40-50 from a file, first using head to get the first 50 lines then tail to get the last 10:
$ head -50 file.log | tail -10


## Load bash as default shell
$ vi .profile
# Add:
bash


## Add an alias in the bash
$ vi ~/.bashrc
# Add
alias ALIAS_NAME='command'
# Examples:
alias ll='ls -l'
alias tailf="tail -f SystemOut.log"


## Customize the shell prompt
$ export PS1="\n\u@\h \w\n$ "
# http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html


## Execute many commands in an "atomic" way
$ command1;command2
# Examples:
$ alias logs="cd /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs;ls"
$ rm app; ln -s app_AAAAMMDD app


## Configure a "daemon"
$ crontab crontab_file
# Print the current crontab
crontab -l 
# To debug the daemon, we need the mail because the deamon will tell us if a task had a problem
mail


## Open a file in edit mode (or create it with a ':wq' at the end)
vi file


## Create a shell script
$ echo "#!/bin/bash" > script.sh
$ vi script.sh
$ chmod u+x script.sh


## Process viewer
$ top
# Or
$ ps
# Examples:
$ ps -ef | grep tomcat

See also:
http://ss64.com/bash/

Configure crontab (UNIX/Linux)


If you are about to modify a crontab, it's better to keep a backup:
In command line:
> crontab -l > /home/usr/crontab_[Modification date : YYYY_MM_DD_hh_mm]_bk 

To modify the crontab, you first need to create a copy of the actual configuration:
crontab -l > /home/usr/crontab_current.txt

# .------------------- minute (0 - 59)
# |   .--------------- hour (0 - 23)
# |   |   .----------- day of month (1 - 31)
# |   |   |   .------- month (1 - 12) OR jan, feb, mar, apr ...
# |   |   |   |   .--- day of week (0 - 6, Sunday = 0) OR sun, mon, tue, wed, thu, fri, sat
# |   |   |   |   |
# *   *   *   *   *   command to be executed
# Operators : * = all
#             , = and
#             - = to
#
# Everyday of the week: 3:40, 7:40, 12:40, 16:40 and 22:40
40 3,7,12,16,22 * * * /application/script/run_refresh.sh param1 param2 > /dev/null


When the modification is over,
> crontab /home/usr/crontab_current.txt

If you are modifying the file in Windows, don't forget to convert the EOL:
> dos2unix /home/usr/crontab_current.txt /home/usr/crontab_current.txt


If you want to periodicaly delete log files, you can add this to the crontab:
> find /opt/logs -name "*.log" -type f -mtime +1 -delete

Commit Monitor - Install (Windows)

Commit Monitor is doing monitoring on the SVN server, so you can be notified when others are committing new modifications.

http://stefanstools.sourceforge.net/CommitMonitor.html

Cntlm - Install (Windows)

Cntlm is an NTLM / NTLM Session Response / NTLMv2 authenticating HTTP proxy


  1. Downdload from the official website : cntlm.sourceforge.net
  2. Unzip to the destination folder, we will call it CNTLM_HOME, ex.: C:\dev\Cntlm
  3. Create an environment variable (if you don't know how, click here)Name: CNTLM_HOME
    Value: C:\dev\Cntlm (it's only an example, choose your destination's folder)
  4. Add to the PATH this new variable CNTLM_HOME (if you don't know how, click here)
  5. Take a backup of the original configuration file %CNTLM_HOME%\cntlm.ini => cntlm.ini.default
  6. Remplace the content of the file in %CNTLM_HOME%\cntlm.ini by...
    # Cntlm Authentication Proxy Configuration
    Username testuser
    Domain corp-uk

    # List of parent proxies to use. More proxies can be defined
    # one per line in format <proxy_ip>:<proxy_port>
    Proxy proxy-name:8080

    # List addresses you do not want to pass to parent proxies
    # * and ? wildcards can be used
    NoProxy localhost, 127.0.0.*, 10.*, 192.168.*

    # Specify the port cntlm will listen on
    # You can bind cntlm to specific interface by specifying
    # the appropriate IP address also in format <local_ip>:<local_port>
    # Cntlm listens on 127.0.0.1:3128 by default
    Listen 3128

    Auth       NTLMv2
    PassNTLMv2 
  7. Replace by your own personal informations:
    Username testuser
    Domain corp-uk
    Proxy proxy-name:8080
  8. In commande line type this command and enter your password :
    >cntlm -I -M http://test.com  -c C:\dev\Cntlm\cntlm.ini
    [PASSWORD]
    Password:
    Config profile  1/4... OK (HTTP code: 200)
    ----------------------------[ Profile  0 ]------
    Auth            NTLMv2
    PassNTLMv2      AA1A11AAA11AAAA1AA11A1AAAA11A11A
    ------------------------------------------------
    Notice: If you get an HTTP code 302, it's fine too.
  9. Copy the value of PassNTLMv2 from the output AA1A11AAA11AAAA1AA11A1AAAA11A11A to the file cntlm.ini, on the same line as PassNTLMv2 
  10. In commande line:
    > cntlm -f -c C:\dev\Cntlm\cntlm.ini
    cntlm: PID 15264: Cntlm ready, staying in the foreground

Node.js configure proxy (HTTP/HTTPS)

For example, if you are behind a corporate proxy , you can configure the credentials to pass through:  In command line:
>npm config set proxy http://[username]:[passwprd]@proxy-name:8080 
>npm config set https-proxy http://[username]:[passwprd]@proxy-name:8080 
>npm config set registry "http://registry.npmjs.org/"

Adding a folder to the PATH (Windows)

The PATH variable in Windows is the list of the folders you can have directly access to their files in command line.  They are separated by a semicolon (;) and actually you can have to PATH variables, one for the user and an other for the system, but in the end they are merged.


  1. Press [Windows] + [Pause] keys
  2. Click on the "Advanced" tab
  3. Click on the "Environment Variables" button
  4. Choose the scope's level : "User variables for xyz" or "System variables" and select the PATH variable
  5. Click on "Edit" button
  6. In the value's field, go to the end of the current value and add a semicolon if there's not already one, then add the path to the folder you want to add, ex.: "%SystemRoot%\system32;C:\dev\Java\jdk1.7.0_51\bin".  If you want to use an other environment variable's value, simply specify the name of the value surrounded by the percent character (%), ex.: "%SystemRoot%\system32;%JAVA_HOME%\bin" would have the same result if the JAVA_HOME variable contain the value "C:\dev\Java\jdk1.7.0_51".
  7. Click on the "OK" button
  8. Click on the "OK" button
  9. Click on the "OK" button

The path "C:\dev\Java\jdk1.7.0_51\bin" is now declared in the PATH.

Creating an environment variable (Windows)

An environment variable is a variable you can have access from anywhere in the Operating System, for example in command line:
> echo %USERNAME%
elenigen

Some are already available in Windows, like USERNAME, USERPROFILE, PATH, etc.  Some can be created by the user.  You can even choose the scope of the variable, by creating it in the user or system's level.

  1. Press [Windows] + [Pause] keys
  2. Click on the "Advanced" tab
  3. Click on the "Environment Variables" button
  4. Choose the scope's level : "User variables for xyz" or "System variables"
  5. Click on the "New" button
  6. Enter variable's name and value.
  7. Click on the "OK" button
  8. Click on the "OK" button
  9. Click on the "OK" button
The new variable has been created!  The tricky part now is, all current command line windows which were already opened before the creation of this new variable, they don't have access to it, so you need to close and reopen the command line.

See also:
ss64.com/nt/syntax-variables.html

Analog - Filter

It's possible to extract the Apache logs and analyse only one part of it to generate the report:
FROM 140130:0000
TO   140130:2359

Exclude some files or files type:
FILEEXCLUDE /test.html
FILEEXCLUDE /*.css


For more details:
www.analog.cx/docs/custom.html

Analog - Install (Windows)

Analog is a free weblog analysis computer program.
  1. Download from the official website: www.analog.cx/download.html
  2. Unzip to the destination folder, we will call it ANALOG_HOME, ex.: C:\dev\analog-6.0
  3. Create a directory for the log files in input, ex.: %ANALOG_HOME%\input (used by the parameter "LOGFILE")
  4. Create a folder for the report, ex.: %ANALOG_HOME%\reports\default (used by the parameter "OUTFILE")
  5. Copy images from the original directory to the report directory %ANALOG_HOME%\images => %ANALOG_HOME%\reports\default\images
  6. Replace the content of the file %ANALOG_HOME%\analog.cfg with this...
# Configuration file for analog 6.0
# See http://www.analog.cx/
#
# Here are a couple of configuration commands to get you started. Add any more
# you like from the Readme.
#
# Lines starting with # are comments.
#
# There is a much more extensive configuration file in examples/big.cfg

# The full list of these COLS commands is :
# YEARCOLS, QUARTERLYCOLS, MONTHCOLS, WEEKCOLS, DAYREPCOLS, DAYSUMCOLS, HOURREPCOLS, 
# HOURSUMCOLS, WEEKHOURCOLS, QUARTERREPCOLS, QUARTERSUMCOLS, FIVEREPCOLS and FIVESUMCOLS. 
# There is also a TIMECOLS command, which specifies that all the time reports are to have 
# the specified columns.
#
# R Number of requests
# r Percentage of the requests
# P Number of page requests
# p Percentage of the page requests
# B Number of bytes transferred
# b Percentage of the bytes

#LANGUAGE FRENCH

FROM 120129:0000
TO   120129:2359

# If you need a LOGFORMAT command (most people don't -- try it without first!),
# it must go here, above the LOGFILE commands.
APACHELOGFORMAT (%h %l %T %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\")
LOGFILE C:\dev\analog-6.0\input\sawebext*


OUTFILE C:\dev\analog-6.0\reports\default\report.html
HOSTNAME "localhost"

#
# You probably don't need to change anything below this until you are
# experienced.
#
ERRFILE errors.txt
# REQINCLUDE pages
REQLINKINCLUDE pages
REFLINKINCLUDE *
REDIRREFLINKINCLUDE *
FAILREFLINKINCLUDE *
SUBBROW */*
SUBTYPE *.gz,*.Z
# OSCHARTEXPAND Windows
# Add whichever of these types of pages you have on your server, or others.
# PAGEINCLUDE *.shtml
# PAGEINCLUDE *.asp
# PAGEINCLUDE *.jsp
# PAGEINCLUDE *.cfm
# PAGEINCLUDE *.pl
# PAGEINCLUDE *.php
# More SEARCHENGINE commands can be found at
#   http://www.analog.cx/helpers/#conffiles
SEARCHENGINE http://*google.*/* q,as_q,as_epq,as_oq
SEARCHENGINE http://*altavista.*/* q
SEARCHENGINE http://*yahoo.*/* p
SEARCHENGINE http://*lycos.*/* query,wfq
SEARCHENGINE http://*aol.*/* query
SEARCHENGINE http://*excite.*/* search
SEARCHENGINE http://*go2net.*/* general
SEARCHENGINE http://*metacrawler.*/* general
SEARCHENGINE http://*msn.*/* q,MT
SEARCHENGINE http://*netscape.*/* search
SEARCHENGINE http://*looksmart.*/* key
SEARCHENGINE http://*webcrawler.*/* qkw,search,searchText
SEARCHENGINE http://*overture.*/* Keywords
SEARCHENGINE http://*teoma.*/* q
SEARCHENGINE http://*infospace.*/* qkw
SEARCHENGINE http://*alltheweb.*/* q
SEARCHENGINE http://*dogpile.*/* q
SEARCHENGINE http://*ask.*/* q,ask
SEARCHENGINE http://*alltheweb.*/* query
SEARCHENGINE http://*northernlight.*/* qr
SEARCHENGINE http://*nlsearch.*/* qr
SEARCHENGINE http://*dmoz.*/* search
SEARCHENGINE http://*/netfind* query
SEARCHENGINE http://*/pursuit query
ROBOTINCLUDE REGEXPI:robot
ROBOTINCLUDE REGEXPI:spider
ROBOTINCLUDE REGEXPI:crawler
ROBOTINCLUDE Googlebot*
ROBOTINCLUDE msnbot*
ROBOTINCLUDE Infoseek*
ROBOTINCLUDE Scooter*
ROBOTINCLUDE *Slurp*
ROBOTINCLUDE *Validator*
ROBOTINCLUDE Ultraseek*
TYPEALIAS .html    ".html [Hypertext Markup Language]"
TYPEALIAS .htm     ".htm  [Hypertext Markup Language]"
TYPEALIAS .shtml   ".shtml [Server-parsed HTML]"
TYPEALIAS .ps      ".ps   [PostScript]"
TYPEALIAS .gz      ".gz   [Gzip compressed files]"
TYPEALIAS .tar.gz  ".tar.gz [Compressed archives]"
TYPEALIAS .jpg     ".jpg  [JPEG graphics]"
TYPEALIAS .jpeg    ".jpeg [JPEG graphics]"
TYPEALIAS .gif     ".gif  [GIF graphics]"
TYPEALIAS .png     ".png  [PNG graphics]"
TYPEALIAS .txt     ".txt  [Plain text]"
TYPEALIAS .cgi     ".cgi  [CGI scripts]"
TYPEALIAS .pl      ".pl   [Perl scripts]"
TYPEALIAS .css     ".css  [Cascading Style Sheets]"
TYPEALIAS .class   ".class [Java class files]"
TYPEALIAS .pdf     ".pdf  [Adobe Portable Document Format]"
TYPEALIAS .zip     ".zip  [Zip archives]"
TYPEALIAS .hqx     ".hqx  [Macintosh BinHex files]"
TYPEALIAS .exe     ".exe  [Executables]"
TYPEALIAS .wav     ".wav  [WAV sound files]"
TYPEALIAS .avi     ".avi  [AVI movies]"
TYPEALIAS .arc     ".arc  [Compressed archives]"
TYPEALIAS .mid     ".mid  [MIDI sound files]"
TYPEALIAS .mp3     ".mp3  [MP3 sound files]"
TYPEALIAS .doc     ".doc  [Microsoft Word document]"
TYPEALIAS .rtf     ".rtf  [Rich Text Format]"
TYPEALIAS .mov     ".mov  [Quick Time movie]"
TYPEALIAS .mpg     ".mpg  [MPEG movie]"
TYPEALIAS .mpeg    ".mpeg [MPEG movie]"
TYPEALIAS .asp     ".asp  [Active Server Pages]"
TYPEALIAS .jsp     ".jsp  [Java Server Pages]"
TYPEALIAS .cfm     ".cfm  [Cold Fusion]"
TYPEALIAS .php     ".php  [PHP]"
TYPEALIAS .js      ".js   [JavaScript code]"
TYPEALIAS .do      ".do   [Java code]"
TYPEALIAS .action  ".action   [Java code]"

# General Summary: This report contains overall statistics.
GENERAL ON

# Yearly Report
YEARLY OFF
#YEARGRAPH R

# Quarterly Report
QUARTERLY OFF
#QUARTERLYGRAPH R

# Monthly Report
MONTHLY OFF
#MONTHGRAPH R

# Weekly Report
WEEKLY OFF
#WEEKGRAPH R

# Daily Report: This report lists the activity in each day.
DAILYREP ON
DAYREPCOLS RrB
#DAYREPGRAPH R
# Daily Summary
DAILYSUM OFF
#DAYSUMCOLS RrB
#DAYSUMGRAPH R

# Hourly Report: This report lists the activity in each hour.
HOURLYREP ON
HOURREPCOLS RrB
#HOURREPGRAPH R
# Hourly Summary
HOURLYSUM OFF
#HOURSUMCOLS RrB
#HOURSUMGRAPH R

# Hour of the Week Summary
WEEKHOUR OFF
#WEEKHOURCOLS RrB
#WEEKHOURGRAPH R

# Quarter-Hour Report: This report lists the activity in each quarter-hour period.
QUARTERREP ON
QUARTERREPCOLS RrB
#QUARTERREPGRAPH R
# Quarter-Hour Summary
QUARTERSUM OFF
#QUARTERSUMCOLS RrB
#QUARTERSUMGRAPH R

# Five-Minute Report: This report lists the activity in each five-minute period.
FIVEREP ON
FIVEREPCOLS RrB
#FIVEREPGRAPH R
# Five-Minute Summary
FIVESUM OFF
#FIVESUMGRAPH R

# Host Report
HOST OFF
#HOSTFLOOR 20r

# Host Redirection Report
REDIRHOST OFF
#REDIRHOSTFLOOR 20r

# Host Failure Report: This report lists the computers which encountered failed requests.
FAILHOST OFF
#FAILHOSTFLOOR 20r

# Organisation Report
ORGANISATION OFF
#ORGFLOOR 20r

# Domain Report
DOMAIN OFF
#DOMFLOOR 20r

# Request Report: This report lists the files on the site.
REQUEST ON
# Include in the Request Report all files with at least 1 request
REQFLOOR 1r

# Directory Report
DIRECTORY OFF
#DIRFLOOR 20r

# File Type Report
FILETYPE OFF
#TYPEFLOOR 20r

# File Size Report
SIZE OFF

# Processing Time Report: This report lists the times taken to process successful requests.
PROCTIME ON

# Redirection Report
REDIR OFF
#REDIRFLOOR 20r

# Failure Report: This report lists the files that caused failures, for example files not found.
FAILURE ON
FAILFLOOR 1r

# Referrer Report: This report lists the referrers (where people followed links from, or pages which included this site's images).
REFERRER ON
REFFLOOR 500r

# Referring Site Report
REFSITE ON
REFSITEFLOOR 1r

# Search Query Report
SEARCHQUERY ON
SEARCHQUERYFLOOR 3r
# Search Word Report
SEARCHWORD OFF
#SEARCHWORDFLOOR 20r

# Internal Search Query Report
INTSEARCHQUERY OFF
#INTSEARCHQUERYFLOOR 20r
# Internal Search Word Report
INTSEARCHWORD OFF
#INTSEARCHWORDFLOOR 20r

# Redirected Referrer Report: This report lists the referrers that caused redirected requests.
REDIRREF OFF
#REDIRREFFLOOR 20r
# Failed Referrer Report: This report lists the referrers containing broken links to the site.
FAILREF OFF
#FAILREFFLOOR 20r

# Browser Report: This report lists the browsers used by visitors.
BROWSERREP OFF
#BROWREPFLOOR 1r
# Browser Summary: This report lists the vendors of visitors' browsers.
BROWSERSUM OFF
#BROWSUMFLOOR 20r

# Operating System Report
OSREP OFF
#OSFLOOR 20r

# Virtual Host Report
VHOST OFF
#VHOSTFLOOR 20r
# Virtual Host Redirection Report
REDIRVHOST OFF
#REDIRVHOSTFLOOR 20r
# Virtual Host Failure Report
FAILVHOST OFF
#FAILVHOSTFLOOR 20r

# User Report
USER OFF
#USERFLOOR 20r
# User Redirection Report
REDIRUSER OFF
#REDIRUSERFLOOR 20r
# User Failure Report
FAILUSER OFF
#FAILUSERFLOOR 20r

# Status Code Report: This report lists the HTTP status codes of all requests.
STATUS ON
#STATUSFLOOR 20r

ALLGRAPH R
TIMECOLS Rr

BARSTYLE b


FILEEXCLUDE /test.html

FILEEXCLUDE /*.js
FILEEXCLUDE /*.jpg
FILEEXCLUDE /*.jpeg
FILEEXCLUDE /*.png
FILEEXCLUDE /*.css
FILEEXCLUDE /*.png
FILEEXCLUDE /*.xml
FILEEXCLUDE /*.gif
FILEEXCLUDE /*.ico
FILEEXCLUDE /*.mp3
FILEEXCLUDE /*.pdf
FILEEXCLUDE /*.swf
FILEEXCLUDE /*.txt