Skip to content

Instantly share code, notes, and snippets.

View adilshehzad786's full-sized avatar
🎯
Focusing

Adil adilshehzad786

🎯
Focusing
View GitHub Profile

Alias for git status with a brief summary:

$ git config --global alias.s "status -sb"

Alias for git log with a pretty format:

$ git config --global alias.lg "log --pretty=format:'%C(yellow)%h%Creset %C(cyan)%ad%Creset %C(red)%an%Creset%C(bold blue)%d%Creset %C(white)%s%Creset'"

Alias for git checkout with a branch name completion:

dex:
enabled: false
server:
extraArgs:
- --insecure
additionalApplications:
- name: argo-demo
namespace: shared-services
appVersion: "1.4.2"
version: 1.8.7
server:
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
@adilshehzad786
adilshehzad786 / bash_aws_jq_cheatsheet.sh
Created January 13, 2022 17:52 — forked from lukeplausin/bash_aws_jq_cheatsheet.sh
AWS, JQ and bash command cheat sheet. How to query, cut and munge things in JSON generally.
# Count total EBS based storage in AWS
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add"
# Count total EBS storage with a tag filter
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add"
# Describe instances concisely
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]'
# Wait until $instance_id is running and then immediately stop it again
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id
# Get 10th instance in the account
@adilshehzad786
adilshehzad786 / gist:944485f7caaee3b0015c099cce17118a
Created January 13, 2022 17:52 — forked from taizo/gist:3141646
Lists AWS instances using python-boto
#!/usr/bin/env python
from pprint import pprint
import boto
import boto.ec2
from boto.ec2.regioninfo import RegionInfo
port=80
access_id = "Your ACCESS_ID"
@adilshehzad786
adilshehzad786 / teamcity.md
Created September 2, 2021 09:15
Installation of Latest 2021 Teamcity on CentOs7
wget -c https://gist.github.com/adilshehzad786/03ba6bdbd8a7225bce7e23b1de3e89dd/raw/68ea31fda0664e578ec732a7f147a9081c473429/install.sh -O /tmp/teamcity-install.sh
sh /tmp/teamcity-install.sh
rm -rf /tmp/teamcity-install.sh
#!/bin/bash
# Install dependencies
yum -y install java-1.8.0-openjdk.x86_64
# Install TeamCity 9.1.7 to /srv/TeamCity
wget -c https://download.jetbrains.com/teamcity/TeamCity-2021.1.2.tar.gz -O /tmp/TeamCity-2021.1.2.tar.gz
tar -xvf /tmp/TeamCity-2021.1.2.tar.gz -C /srv
rm -rf /tmp/TeamCity-2021.1.2.tar.gz
mkdir /srv/.BuildServer
@adilshehzad786
adilshehzad786 / kubernetes_commands.md
Created August 8, 2021 15:36 — forked from edsiper/kubernetes_commands.md
Kubernetes Useful Commands
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.1.14562",
"templateHash": "12367894147709986470"
}
},
@adilshehzad786
adilshehzad786 / main.yml
Last active June 20, 2021 10:53
main.yml
on : [workflow_dispatch]
jobs:
custom-js-action-job:
runs-on : ubuntu-latest
name : Custom JS gitHub Action
steps: