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 / 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', {
@sivaprasadreddy
sivaprasadreddy / Contact-Service-Ctrl.js
Created September 5, 2014 12:15
Contact-Service-Ctrl.js
myApp.service('ContactService', ['$http',function($http){
this.getContacts = function(){
var promise = $http.get('contacts')
.then(function(response){
return response.data;
},function(response){
alert('error');
});
return promise;
@sivaprasadreddy
sivaprasadreddy / Contact-Entity-Repo-Ctrl.java
Created September 5, 2014 12:14
Contact-Entity-Repo-Ctrl.java
@Entity
public class Person implements Serializable
{
private static final long serialVersionUID = 1L;
@Id @GeneratedValue(strategy=GenerationType.AUTO)
private Integer id;
private String email;
private String password;
private String firstname;
private String lastname;