Skip to content

Instantly share code, notes, and snippets.

🎯
Focus

Alok Pandey wildoctopus

Block or report user

Report or block wildoctopus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wildoctopus
wildoctopus / CORS Filter
Created Apr 16, 2018
How to fix the CORS issue on backend side , java Springboot App (Handling Simple CORS requests)
View CORS Filter
//Contents from https://spring.io/understanding/CORS
In the simplest scenario, cross-origin communications starts with a client making a GET, POST, or HEAD request against a resource on the server.
In this scenario, the content type of a POST request is limited to application/x-www-form-urlencoded, multipart/form-data, or text/plain. The request includes an Origin header that indicates the origin of the client code.
The server will consider the request's Origin and either allow or disallow the request. If the server allows the request, then it will respond with the requested resource and an Access-Control-Allow-Origin header in the response. This header will indicate to the client which client origins will be allowed to access the resource. Assuming that the Access-Control-Allow-Origin header matches the request's Origin, the browser will allow the request.
On the other hand, if Access-Control-Allow-Origin is missing in the response or if it doesn't match the request's Origin, the browser will disallow th
@wildoctopus
wildoctopus / grunt-war.js
Created Apr 3, 2018
Snippet of code using Grunt to Generate .war file to deploy on any Tomcat server
View grunt-war.js
// Save this snippet as grunt-war.js and run with "grunt --gruntfile grunt-war.js war" at the command line.
// Assumes simple layout:
// -project
// --build (The folder where the generated grunt-magic.war file will go)
// --src (all the source code, html, etc)
// --- index.html (The file name must match up with the webxml_welcome: property below)
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-war' );
var taskConfig = {
@wildoctopus
wildoctopus / PolyGlot
Created Mar 31, 2018
ChatBot - Translate Text in a image to desired Language
View PolyGlot
--- steps -
first extract text from image (dOCR)
use APIs to translate text in desired language
You can’t perform that action at this time.