Skip to content

Instantly share code, notes, and snippets.

View gauravpaliwal's full-sized avatar

Gaurav Paliwal gauravpaliwal

View GitHub Profile
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;
@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">
@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 / 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 / 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
Code :
git : https://github.com/gauravpaliwal/General-Feedback-Module-OpenMRS
svn : https://source.openmrs.org/browse/Modules/feedback/trunk
Design : https://wiki.openmrs.org/display/projects/General+Feedback+Mechanism+%28Design+Page%29
Implementation Idea : https://wiki.openmrs.org/display/projects/General+Feedback+Mechanism+%28Implementation+Ideas%29
User Documentation : https://wiki.openmrs.org/display/docs/Feedback+Module
gs -sOutputFile=<name_of_output_file> -sDEVICE=pdfwrite \
-sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray \
-dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH <name_of_file_to_convert> < /dev/null
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openmrs.module</groupId>
<artifactId>feedback-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>org.openmrs.module</groupId>
@gauravpaliwal
gauravpaliwal / pom.xml
Created July 29, 2011 00:30
POM file
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openmrs.module</groupId>
<artifactId>feedback-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>org.openmrs.module</groupId>
<artifactId>feedback</artifactId>
<packaging>omod</packaging>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openmrs.module</groupId>