Skip to content

Instantly share code, notes, and snippets.

View rgodishela's full-sized avatar

Ramesh Godishela rgodishela

  • https://github.com/salesforce
  • Hyderabad, India
View GitHub Profile
@rgodishela
rgodishela / mac_setup.txt
Created July 25, 2018 07:36
MacbookSetup
xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew install caskroom/cask/brew-cask
@rgodishela
rgodishela / liveness.txt
Created June 26, 2018 16:34
Liveness check
#Install Google cloud SDK
curl https://sdk.cloud.google.com | bash
exec -l $SHELL
# Setup the GCP to work with gcloud, enable required API's
gcloud init
gcloud config set project PROJECT_ID
gcloud config set compute/zone COMPUTE_ZONE
@rgodishela
rgodishela / kubernetes-ubuntu-install.sh
Created April 11, 2018 10:10 — forked from sanketsudake/kubernetes-ubuntu-install.sh
[Ubuntu Linux]Kubernetes Minikube Helm Installation
# Install virtualbox
sudo apt install virtualbox
# Install Kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin
# Install Minikube
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.14.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
# Launch Minikube
minikube start
@rgodishela
rgodishela / dcos marathon
Last active March 25, 2018 18:41
dcos marathon cli
dcos package --config-schema
dcos package --help
dcos package --info
dcos package describe <package-name>
[(--app [--render]) --cli --config --options=<file>]
[--package-version=<package-version>]
dcos package describe <package-name> --package-versions
dcos package install <package-name>
[(--cli [--global]) | --app]
[--package-version=<package-version>]
@rgodishela
rgodishela / dynamodb_autoscale.ps1
Last active October 14, 2017 16:34
powershell script to Autoscale dynamodb table
#####IMPORTANT INSTRUCTIONS to execute these instrcutions
#1. U should have role and policy created and attach them to each other
#2. U should have dynamodb table
#3. u should have AWS Tools for powershell 3.3.169
#First Get the Role Arn
$DDBRole = Get-IAMRole -RoleName ddb-role
$DDBRoleArn = $DDBRole.Arn
#Get the Table Name
@rgodishela
rgodishela / pp_json
Created September 15, 2017 09:28
pp_json
import json
def pp_json(json_thing, sort=True, indents=4):
if type(json_thing) is str:
print(json.dumps(json.loads(json_thing), sort_keys=sort, indent=indents))
else:
print(json.dumps(json_thing, sort_keys=sort, indent=indents))
return None
pp_json(your_json_string_or_dict)
@rgodishela
rgodishela / prometheus
Created July 30, 2017 17:13
prometheus info
Videos:
https://prometheus.io/docs/introduction/media/
https://github.com/prometheus/alertmanager
https://prometheus.io/docs/alerting/alertmanager/
https://prometheus.io/docs/alerting/notification_examples/
https://github.com/prometheus/alertmanager/blob/master/doc/examples/simple.yml
https://quay.io/repository/prometheus/alertmanager
https://prometheus.io/webtools/alerting/routing-tree-editor/
https://www.youtube.com/watch?v=cR9Fp6hwTLE&list=PLqm7NmbgjUExeDZU8xb2nxz-ysnjuC2Mz&index=4
@rgodishela
rgodishela / chef
Last active July 11, 2017 06:58
Learn-Chef
#Install Chef DK 0.18.30
curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P chefdk -c stable -v 0.18.30
#Install Few software
yum install vim tree git -y
#Run Chef client in localmode
chef-client --local-mode webserver.rb
#Generate cookobooks
@rgodishela
rgodishela / Pythonista
Created June 22, 2017 04:40
Python tips and tricks
How to reverse a list in Python?
1. reverse in-place
list.reverse()
2. list slicing trick
lst[::-1]
3. Reversed iterator
reversed(lst)
list(reversed(lst))
@rgodishela
rgodishela / setupClusterMetrics.sh
Created June 8, 2017 08:32 — forked from rafaeltuelho/setupClusterMetrics.sh
Simple bash script to configure the Cluster Metrics components on OCP v3.3 (tested on CDK > 2.2)
#!/bin/bash
echo -e "\n --- \n Configuring Metrics Components \n --- \n"
echo -e "\t Service Accounts"
echo -e "\t\t Create a metrics-deployer service account:"
oc login --username=<admin_user> --password=<passwd> --namespace=openshift-infra
oc create -f - <<API
apiVersion: v1