Skip to content

Instantly share code, notes, and snippets.

@NKjoep
NKjoep / console.log.reg
Created May 6, 2011 10:06
Fast RegExp which find and replace all console.log( occurences in your code and comment them out.
//find this
(^.*[^//])console.log
//replace with
$1//console.log
@NKjoep
NKjoep / current_jsp_path_filename.jsp
Created March 25, 2011 12:04
This will print out the full path of the executed JSP
This JSP is placed:
<%=getServletConfig().getServletContext().getRealPath(request.getServletPath())%>
@NKjoep
NKjoep / google-chrome-nocache.sh
Created March 22, 2011 13:48
Launch Google Chrome with cache disable
#!/bin/bash
## Description: Launch Google Chrome with cache disable
## Author: Andrea D. <nkjoep@gmail.com>
#
## Remember to change the path :)
/usr/bin/google-chrome %U --disk-cache-size=1 --media-cache-size=1
@NKjoep
NKjoep / fast-renamer.sh
Created March 18, 2011 15:09
This simple bash script will rename all the files in the current directory: all lowercase, spaces to _ , minus - to _
#!/bin/bash
rename 'y/A-Z/a-z/' *
rename 'y/ /_/' *
rename 'y/-/_/' *
@NKjoep
NKjoep / backup-japs.sh
Created March 18, 2011 13:10
This script will backup both your PostgreSQL databases of your jAPS Entando application.
#!/bin/bash
## Title: backup-japs.sh
#
## Description: This script will backup both your PostgreSQL databases of your jAPS Entando application.
## Will write in the current directoy two files: 2010-03-18-1406_PortalExamplePort.backup, 2010-03-18-1406_PortalExampleServ.backup
#
## Usage: backup-japs.sh host port username password project
## Example: backup-japs.sh localhost 5432 agile mypassword PortalExample
#
#