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 / userdata.sh
Last active February 26, 2018 18:59
User Data for DO Droplets
#!/bin/bash
cd ~
curl -O https://storage.googleapis.com/us-east-4-anand-files/misc-files/step.sh
chmod 755 ~/step.sh
@indrayam
indrayam / retrieve-ec2-instance-types.sh
Created May 29, 2018 18:11 — forked from nmagee/retrieve-ec2-instance-types.sh
Query the AWS Pricing API to get all currently available EC2 instance types
#!/bin/bash
curl https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/index.json | jq -r '.products[].attributes["instanceType"]' | sort -u | grep '\.'
@indrayam
indrayam / developer-workflow-notes.md
Last active August 22, 2018 20:42
Developer Workflow for Apps Running in Kubernetes

Developer Workflow for Apps Running in Kubernetes

Assumptions:

  • CD Pipeline includes: Git => Jenkins => CI (w/ Static Code Analysis, SAST, etc.) => Docker Registry => Spinnaker
  • CD Pipeline design should be optimized for Developer Experience and Overall Speed of Deployment to the target lifecycle, without compromising on Quality or Security

Broad Brush Strokes:

  • In an ideal world, a developer should be able to perform "Write Code, Build Code, Test Code" loop on their local machine
@indrayam
indrayam / pragmatic-practices.md
Last active February 25, 2019 21:31
Pragmatic Practices to Build Modern Containerized Apps Running on Kubernetes
@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 = [email protected]: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 / 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 / ..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 / 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 / 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 / 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