Skip to content

Instantly share code, notes, and snippets.

View sivaprasadreddy's full-sized avatar
:octocat:
Learning and Teaching

K. Siva Prasad Reddy sivaprasadreddy

:octocat:
Learning and Teaching
View GitHub Profile
@sivaprasadreddy
sivaprasadreddy / guidelines.md
Last active May 28, 2025 06:52
Junie guidelines for Spring Boot project development

Junie Guidelines

This document provides guidelines for developing a Spring Boot project. It includes coding standards, Spring Boot best practices and testing recommendations to follow.

Prerequisites

  • Java 21 or later
  • Docker and Docker Compose
  • Maven (or use the included Maven wrapper)
@sivaprasadreddy
sivaprasadreddy / ContentTypeOverrideFilter.java
Created September 3, 2024 16:28
Spring Boot Override ContentType Header
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequestWrapper;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;
import java.io.IOException;
@sivaprasadreddy
sivaprasadreddy / JavaPackageVisibilityTest.java
Last active March 5, 2024 10:31
Java Package Visibility
package com.sivalabs.component_a;
//This is package-private, can't be accessed from outside of "com.sivalabs.component_a" package
class Mapper {
public String toUpper(String input) {
return input.toUpperCase();
}
}
-----------------------------------------
@sivaprasadreddy
sivaprasadreddy / remote-docker-setup.txt
Created February 28, 2024 00:52
Remote Docker Host Setup on AWS EC2
1. Create EC2 instance using Ubuntu
2. Connect to EC2 VM using ssh
3. Install Docker by following https://docs.docker.com/engine/install/ubuntu/
4. Run post installation steps to run Docker as a non-privileged user https://docs.docker.com/engine/install/linux-postinstall/
5. From local computer, copy your ssh publicKey content (i.e, ~/.ssh/id_rsa.pub or ~/.ssh/id_ed25519.pub)
6. In EC2 VM, add your public ssh public key to ~/.ssh/authorized_keys using echo 'ssh-rsa ....' >> ~/.ssh/authorized_keys
7. Now from local computer, you should be able to login using : `ssh ubuntu@EC2_PUBLIC_IP`
8. Set `DOCKER_HOST` env var as `export DOCKER_HOST=ssh://ubuntu@EC2_PUBLIC_IP`
9. Run docker info. It should connect to remote docker running in your EC2 EC2_PUBLIC_IP
@sivaprasadreddy
sivaprasadreddy / intellij-kotlin-dsl-error.log
Last active October 25, 2023 02:09
intellij-kotlin-dsl-error-log
----------------------------------- New Logs ------------------------------------------------------------
2023-10-25 07:31:19,785 [ 6397] INFO - #c.i.o.p.MergingQueueGuiExecutor - Running task: (dumb mode task) UnindexedFilesIndexer[demo5, 0 iterators, reason: On refresh of files in demo5]
2023-10-25 07:31:20,624 [ 7236] INFO - #c.i.o.a.i.PopupMenuPreloader - 2599 ms since showing to preload popup menu 'Project View Popup Menu' at 'ProjectViewPopup(preload-bgt)' in 365 ms
2023-10-25 07:31:20,696 [ 7308] INFO - #c.i.d.u.SqlDialects - SQL dialects initialized in 1 ms
2023-10-25 07:31:20,731 [ 7343] INFO - #c.i.o.a.i.PopupMenuPreloader - 2377 ms since showing to preload popup menu 'Editor Popup Menu' at 'EditorPopup(preload-bgt)' in 376 ms
2023-10-25 07:31:20,731 [ 7343] INFO - #c.i.o.a.i.PopupMenuPreloader - 2618 ms since showing to preload popup menu 'Editor Popup Menu' at 'EditorPopup(preload-bgt)' in 472 ms
2023-10-25 07:31:23,041 [ 9653] INFO - #c.i.i.s.download - Selected pre-built
@sivaprasadreddy
sivaprasadreddy / gist:e1d0c34d418195a682d01a0dc63c2b6d
Created February 24, 2019 19:03 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@sivaprasadreddy
sivaprasadreddy / angularjs-filters.html
Created September 15, 2014 06:28
AngularJS filters final HTML
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>My AngularJS App</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
@sivaprasadreddy
sivaprasadreddy / index-links.html
Created September 5, 2014 12:17
index-links.html
@sivaprasadreddy
sivaprasadreddy / contacts-1.html
Created September 5, 2014 12:17
contacts-1.html
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="contact in contacts">
<td>{{contact.firstname + ' '+ (contact.lastname || '')}}</td>
@sivaprasadreddy
sivaprasadreddy / app-1.js
Created September 5, 2014 12:16
app-1.js
var myApp = angular.module('myApp',['ngRoute']);
myApp.config(['$routeProvider','$locationProvider',
function($routeProvider, $locationProvider) {
$routeProvider
.when('/home', {
templateUrl: 'templates/home.html',
controller: 'HomeController'
})
.when('/contacts', {