Skip to content

Instantly share code, notes, and snippets.

View indrayam's full-sized avatar
💭
Onwards and upwards

Anand Sharma indrayam

💭
Onwards and upwards
View GitHub Profile
@indrayam
indrayam / FileIOTest1.java
Last active June 19, 2019 23:15
Simplest FileIO in Java (Part 1)
package dev.anandsharma.corejava.ch3;
import java.io.IOException;
import java.io.PrintWriter;
import java.nio.charset.StandardCharsets;
import java.nio.file.Path;
import java.util.Scanner;
public class FileIOTest1 {
public static final String RW_FILE_PATH = "/Users/anasharm/Downloads/test1.txt";
@indrayam
indrayam / .vimrc
Last active March 3, 2019 20:14
My .vimrc (as of March 2019)
" .vimrc
" Maintained by: Anand Sharma
" anand.sharma@gmail.com
" Heavily borrowed from https://github.com/zanshin/dotfiles
" Need more studying: https://bitbucket.org/sjl/dotfiles/src/4e6f3d36c2417fd778f30192b90c51795bdcd368/vim/vimrc?at=default
"
" -------------------------------------------------------------------
" Forget compatibility with vi
" -------------------------------------------------------------------
set nocompatible
@indrayam
indrayam / settings.json
Last active August 7, 2020 20:17
My VSCode Settings (Aug 2020)
// Place your settings in this file to overwrite the default settings
{
// Workbench Settings
"workbench.activityBar.visible": true,
"workbench.tips.enabled": false,
"workbench.startupEditor": "none",
"workbench.settings.editor": "json",
"workbench.editor.highlightModifiedTabs": true,
"workbench.editor.enablePreview": false,
"workbench.colorCustomizations": {
@indrayam
indrayam / cloudy-apps.md
Last active February 26, 2019 14:47
Building Cloudy Apps in 2019!

Building Cloudy Apps in 2019!

Before we start building LOTS and LOTS of Spring Boot based Cloudy Apps in 2019, let's go back to the books and (re)learn how to build them today. Remember, the last time we got into building Microservices it was 2015!

Bottomline, we need to build Spring Boot Seed App(s), AGAIN!

Java

Basics to stick with

@indrayam
indrayam / my-vscode-extensions.sh
Last active August 7, 2020 20:21
VS Code Extensions (as of Aug 2020)
code --install-extension 4ops.terraform
code --install-extension akamud.vscode-theme-onelight
code --install-extension akarlsten.vscode-snazzy-akarlsten
code --install-extension alefragnani.project-manager
code --install-extension alexanderte.dainty-vscode
code --install-extension anotherglitchinthematrix.monochrome
code --install-extension azemoh.one-monokai
code --install-extension bierner.github-markdown-preview
code --install-extension bierner.markdown-checkbox
code --install-extension bierner.markdown-emoji
@indrayam
indrayam / export-vscode-extensions.md
Created December 8, 2018 16:04
Export VS Code Extensions List

Manual - By script

In machine A,

code --list-extensions | xargs -L 1 echo code --install-extension copy and paste the echo output to machine B

sample output

@indrayam
indrayam / ..git-pr.md
Created October 5, 2018 12:49 — forked from gnarf/..git-pr.md
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
@indrayam
indrayam / GitHub-Forking.md
Created October 4, 2018 12:56 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@indrayam
indrayam / Checkout-PR-Locally.md
Last active October 4, 2018 12:57 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@indrayam
indrayam / pragmatic-practices.md
Last active February 25, 2019 21:31
Pragmatic Practices to Build Modern Containerized Apps Running on Kubernetes