Skip to content

Instantly share code, notes, and snippets.

View gauravpaliwal's full-sized avatar

Gaurav Paliwal gauravpaliwal

View GitHub Profile
@gauravpaliwal
gauravpaliwal / search.sh
Created August 22, 2011 15:48
Search for a string inside all files in the current directory
find . -type f -print0 | xargs -0 grep -i <pattern>
#Source : http://www.commandlinefu.com/commands/view/3568/search-for-a-string-inside-all-files-in-the-current-directory
@gauravpaliwal
gauravpaliwal / photo_processing.sh
Created August 22, 2011 16:09
Shell Script to rename and decrease size of photo in one go
#rename JPG to jpg
for i in *.JPG;
do mv $i `basename $i JPG`jpg;
done
#resizing photos
for i in *.JPG;
@gauravpaliwal
gauravpaliwal / sms.pl
Created January 27, 2012 03:06
Perl Script to send SMS to mobile from computer
#!/usr/bin/perl
###############################################################################################
# source link : http://digitalpbk.com/2009/12/perl-script-send-free-sms-any-mobile-number-india-using-way2sms
# From CPAN : from CPAN link itself you can download the source for way2sms.
#
# Modified by : Arulalan.T (arulalant@gmail.com)
#
# Version : 1b on 29-10-2011
#
@gauravpaliwal
gauravpaliwal / helloworld.diff
Created July 7, 2012 18:29
Diff file of helloworld module to make it run on netbeans without any workaround.
Index: omod/src/main/resources/HelloWorld.hbm.xml
===================================================================
--- omod/src/main/resources/HelloWorld.hbm.xml (revision 28269)
+++ omod/src/main/resources/HelloWorld.hbm.xml (working copy)
@@ -3,7 +3,7 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
-<hibernate-mapping package="@MODULE_PACKAGE@">
+<hibernate-mapping package="org.openmrs.module.helloworld">
package org.openmrs.module.patientmatching.web;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;