Skip to content

Instantly share code, notes, and snippets.

View rajendarreddyj's full-sized avatar
💭
I may be slow to respond.

Rajendarreddy Jagapathi rajendarreddyj

💭
I may be slow to respond.
View GitHub Profile
@rajendarreddyj
rajendarreddyj / beans.xml
Created October 21, 2015 18:56
Add beans.xml to META-INF or WEB-INF to enable Contexts and Dependency Injection(CDI) for the Java EE Platform. This will avoid NullPointerException while injecting.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
</beans>
@rajendarreddyj
rajendarreddyj / footer.jsp
Last active October 19, 2022 13:38
to print current year in copy right footer using jstl
@rajendarreddyj
rajendarreddyj / AES.java
Created April 5, 2016 03:53 — forked from dweymouth/AES.java
A Java class to perform password-based AES encryption and decryption
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <dweymouth@gmail.com> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return. D. Weymouth 4/2014
* ----------------------------------------------------------------------------
*/
import java.io.*;
package com.rajendarreddyj.weblogic.decryptor;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import sun.misc.BASE64Decoder;
import javax.crypto.*;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.PBEParameterSpec;
import javax.crypto.spec.SecretKeySpec;
@rajendarreddyj
rajendarreddyj / checkBrowserVersion.jsp
Last active January 22, 2017 15:31
check Browser Version
<%
boolean showPopup = false;
try {
String userAgent = request.getHeader("user-agent");
String browserVersion = "UNKNOWNVERSION";
String majorVersion = "1";
int validVersion = 1;
String user = userAgent.toLowerCase();
if (userAgent != null) {
@rajendarreddyj
rajendarreddyj / DbeaverStringEncrypter.java
Created January 25, 2017 22:36
program to decrypt password values in .dbeaver-data-sources.xml
package com.rajendarreddyj.java;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.util.Arrays;
/**
@rajendarreddyj
rajendarreddyj / prettyprint.html
Last active January 24, 2021 16:46
prettify xml/html/json/sql
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Pretty print or minify text in XML, JSON, CSS and SQL formats</title>
<meta name="keywords" content="pretty, print, minify, text, xml, json, css, sql, formats, formatter, beautify" />
<meta name="description" content="Pretty print or minify text in XML, JSON, CSS and SQL formats" />
<style type="text/css">
#cssxOutput {
@rajendarreddyj
rajendarreddyj / pdfprint.html
Created February 5, 2017 20:06
print pdf from html using jspdf
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hello world</title>
</head>
<body>
<h1>Hello world</h1>
@rajendarreddyj
rajendarreddyj / pdfprintwithcss.html
Created February 6, 2017 06:23
jspdf with html canvas
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hello world</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
@rajendarreddyj
rajendarreddyj / gitflow-breakdown.md
Created March 6, 2017 00:15 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository