Skip to content

Instantly share code, notes, and snippets.

View Anjireddy4246's full-sized avatar

Anji... Anjireddy4246

View GitHub Profile
@Anjireddy4246
Anjireddy4246 / CORSFilter
Created April 10, 2019 12:37
CORS Filter In Java
package com.learninghub.infra.filter.cors;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import javax.servlet.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@Anjireddy4246
Anjireddy4246 / gist:0894e4e5469619f5906fb124ad3d8e38
Created December 7, 2018 11:20 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@Anjireddy4246
Anjireddy4246 / DateUtils
Created December 1, 2018 12:59
Date Conversion utilities in JAVA
package com.titan.infra.dateutils;
import org.apache.commons.lang.StringUtils;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
@Anjireddy4246
Anjireddy4246 / s3-invalidation.js
Created October 27, 2018 09:56 — forked from supinf/s3-invalidation.js
AWS Lambda script:: CloudFront Invalidations which are triggered by s3 events.
console.log('Loading event');
var Q = require('q');
var aws = require('aws-sdk');
var cloudfront = new aws.CloudFront();
exports.handler = function (event, context) {
//_log('Received event: ', event);
var bucket = event.Records[0].s3.bucket.name;
@Anjireddy4246
Anjireddy4246 / nginx.conf
Created October 23, 2018 08:31 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048