Skip to content

Instantly share code, notes, and snippets.

View pallav8990's full-sized avatar

pallav pallav8990

  • India
View GitHub Profile
@pallav8990
pallav8990 / awx_install.md
Created January 9, 2019 09:28 — forked from davivcgarcia/awx_install.md
Ansible AWX - Basic Install Example @ RHEL 7

Ansible AWX - Basic Install Example @ RHEL 7

  1. Enable proper repositories:
subscription-manager repos --disable="*" \
                           --enable=rhel-7-server-rpms \
                           --enable=rhel-7-server-extras-rpms
@pallav8990
pallav8990 / openshift_cli_tricks.MD
Created September 4, 2018 07:57 — forked from tuxfight3r/openshift_cli_tricks.MD
openshift cli tricks - using go templates

openshift list all pods and thier specs (requests/limits)

oc get pod -o jsonpath='{range .items[*]}{"SPEC:  \n  LIMITS  : "}{.spec.containers[*].resources.limits}{"\n  REQUESTS: "}{.spec.containers[*].resources.requests}{"\n"}{end}'

openshift list all pods and thier specs with name (requests /limits)

oc get pod -o jsonpath='{range .items[*]}{"NAME:  "}{.metadata.name}{"\nSPEC:  \n  LIMITS  : "}{.spec.containers[*].resources.limits}{"\n  REQUESTS: "}{.spec.containers[*].resources.requests}{"\n\n"}{end}'
@pallav8990
pallav8990 / csv2json.sh
Created August 20, 2018 08:45 — forked from DecisionNerd/csv2json.sh
CSV to JSON converter using BASH. Original script from http://blog.secaserver.com/2013/12/convert-csv-json-bash/
#!/bin/bash
# CSV to JSON converter using BASH
# original script from http://blog.secaserver.com/2013/12/convert-csv-json-bash/
# thanks SecaGuy!
# Usage ./csv2json.sh input.csv > output.json
input=$1
[ -z $1 ] && echo "No CSV input file specified" && exit 1
[ ! -e $input ] && echo "Unable to locate $1" && exit 1