Skip to content

Instantly share code, notes, and snippets.

View pethaniakshay's full-sized avatar
🎯
Focusing

Akshay Pethani pethaniakshay

🎯
Focusing
View GitHub Profile
@pethaniakshay
pethaniakshay / AESEncryption.java
Created August 3, 2017 14:59
AES Encryption algorithm in java
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
http://www.onlinetutorialspoint.com/spring/spring-mvc-login-form-example.html
@pethaniakshay
pethaniakshay / template.html
Last active December 10, 2017 10:43
Boot Strap Basic Template with CDN [ Boot strap , Jquery]
<!doctype html>
<html lang="en">
<head>
<title>Home</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
@pethaniakshay
pethaniakshay / IntelliJIDEA-Getter-Setter-Format.md
Created October 27, 2018 04:11
Getter Setter Format For IntelliJ IDEA

Getter Template

public ##
#if($field.modifierStatic)
static ##
#end
$field.type ##
#set($name = $StringUtil.capitalizeWithJavaBeanConvention($StringUtil.sanitizeJavaIdentifier($helper.getPropertyName($field, $project))))
get##
@pethaniakshay
pethaniakshay / open-vpn.sh
Created November 2, 2018 13:12
Shell script for installation of Open VPN
#!/bin/bash
#
#
# Copyright (c) 2018 Akshay Pethani Released under the MIT License.
# Detect Debian users running the script with "sh" instead of bash
if readlink /proc/$$/exe | grep -q "dash"; then
echo "This script needs to be run with bash, not sh"
exit
@pethaniakshay
pethaniakshay / eureka-pom-dependencies-pom.xml
Last active April 24, 2019 03:38
Spring Boot Dependencies for Eureka Service Discovery Server
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
</dependencies>
@pethaniakshay
pethaniakshay / eureka-service.properties
Created April 24, 2019 03:35
Eureka Service Properties
server.port=9095
spring.application.name=eureka-ribbon
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
package com.codepuran;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
@SpringBootApplication
@EnableEurekaServer
public class EurekaNamingServerApplication {
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
server.port= 0
spring.application.name=student
server.servlet.context-path=/student
eureka.client.serviceUrl.defaultZone=http://localhost:9095/eureka/
eureka.instance.instanceId=${spring.application.name}:${random.value}