Skip to content

Instantly share code, notes, and snippets.

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

K. Siva Prasad Reddy sivaprasadreddy

:octocat:
Learning and practicing...
View GitHub Profile
@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 / AuthenticationTokenInjectHandler.java
Created April 30, 2012 05:14
JAX-WS WSI Authentication using UserName & Password Security Headers
import java.io.IOException;
import java.util.Set;
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPConstants;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPFactory;
import javax.xml.soap.SOAPHeader;
@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 / HelloAngular-Application.java
Created September 4, 2014 12:49
Hello AngularJS Application.java
package com.sivalabs.app;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Configuration
@sivaprasadreddy
sivaprasadreddy / hello-ang-webjars-basic.html
Created September 4, 2014 12:48
hello-ang-webjars-basic html
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>DashBoard</title>
<link rel="stylesheet" href="webjars/bootstrap/3.2.0/css/bootstrap.css"/>
<link rel="stylesheet" href="webjars/font-awesome/4.1.0/css/font-awesome.css"/>
<link rel="stylesheet" href="css/styles.css"/>
</head>
@sivaprasadreddy
sivaprasadreddy / RESTEasy+Spring-Web.xml
Created June 6, 2012 16:37
RESTEasy+Spring Web.xml
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<listener>
<listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
</listener>
@sivaprasadreddy
sivaprasadreddy / hello-angularjs.html
Created September 4, 2014 12:44
AngularJS HelloWorld
<html>
<head>
<title>Hello AngularJS</title>
<meta charset="UTF-8">
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
</head>
<body ng-app>
<p>Enter Name: <input type="text" ng-model="myname"> </p>
<p>Hello {{myname}}!!</p>
</body>