Skip to content

Instantly share code, notes, and snippets.

Avatar

Gaurav Paliwal gauravpaliwal

View GitHub Profile
View Test
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 Jul 7, 2012
Diff file of helloworld module to make it run on netbeans without any workaround.
View helloworld.diff
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 Jan 27, 2012
Perl Script to send SMS to mobile from computer
View sms.pl
#!/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 Aug 22, 2011
Shell Script to rename and decrease size of photo in one go
View photo_processing.sh
#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 Aug 22, 2011
Search for a string inside all files in the current directory
View search.sh
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
View readme
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
View greyscale.sh
gs -sOutputFile=<name_of_output_file> -sDEVICE=pdfwrite \
-sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray \
-dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH <name_of_file_to_convert> < /dev/null
View pom.xml
<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>
View pom.xml
<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>
View pom.xml
<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>