Skip to content

Instantly share code, notes, and snippets.

View AjayJagan's full-sized avatar
🎯
Focusing

Ajay Jaganathan AjayJagan

🎯
Focusing
  • Red Hat
  • Bengaluru
  • 14:56 (UTC +05:30)
View GitHub Profile
{
"com.coreos.operators.v1alpha1.ClusterServiceVersion": {
"description": "ClusterServiceVersion is a Custom Resource of type `ClusterServiceVersionSpec`.",
"properties": {
"apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": "string"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
---
apiVersion: monitoring.rhobs/v1alpha1
kind: AlertmanagerConfig
metadata:
name: rhoai-alertmanager-config
labels:
rhoai-monitoring: 'true'
namespace: redhat-ods-monitoring
spec:
receivers:
@AjayJagan
AjayJagan / flight-details-scrapper.py
Last active May 15, 2024 16:14
flight details scrapper
from datetime import datetime
import os
import re
import time
import pandas as pd
import numpy as np
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.common.exceptions import NoSuchElementException, NoSuchWindowException
from selenium.webdriver.common.by import By
name: "Update versions"
on:
workflow_dispatch:
inputs:
version:
description: 'odh release version'
required: true
type: string
codeflare-branch:
description: 'Codeflare release branch'
#!/bin/bash
update_tags(){
MANIFEST_STR=$(cat get_all_manifests.sh | grep $1 | sed 's/ //g')
readarray -d ":" -t STR_ARR <<< "$MANIFEST_STR"
RES=""
for i in "${!STR_ARR[@]}"; do
if [ $i == 2 ]; then
RES+=$2":"
else
RES+=${STR_ARR[$i]}":"
@AjayJagan
AjayJagan / release.yaml
Created March 23, 2024 08:17
test release
name: "Deploy on Comment"
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
on:
issue_comment:
types: [created]
jobs:
deploy:
name: Deploy
from ruamel.yaml import YAML
from ast import literal_eval
import io
from ruamel.yaml.scalarstring import PreservedScalarString as pss
import os
import sys
import shutil
import requests
import gitlab
@AjayJagan
AjayJagan / upstream_nightly_automation.py
Last active March 5, 2024 04:51
snyc script upstream-nightly
from ruamel.yaml import YAML
from ast import literal_eval
import io
from ruamel.yaml.scalarstring import PreservedScalarString as pss
import os
import sys
import shutil
import requests
import gitlab
@AjayJagan
AjayJagan / datagrid.tsx
Created March 1, 2024 10:06
data grid with row vals
import * as React from 'react';
import { DataGrid, GridColDef, GridValueGetterParams } from '@mui/x-data-grid';
import Button from '@mui/material/Button';
const columns: GridColDef[] = [
{ field: 'id', headerName: 'ID', width: 70 },
{ field: 'firstName', headerName: 'First name', width: 130 },
{ field: 'lastName', headerName: 'Last name', width: 130 },
{
field: 'age',
headerName: 'Age',
@AjayJagan
AjayJagan / snyk-issue.txt
Created February 19, 2024 05:32
snyk issue example
AggregatedIssue(
id='SNYK-GOLANG-GITHUBCOMCONTAINERDCONTAINERDV2-6219725',
issueType='vuln',
pkgName='github.com/containerd/containerd',
pkgVersions=['v1.7.0'],
issueData=IssueData(
id='SNYK-GOLANG-GITHUBCOMCONTAINERDCONTAINERDV2-6219725',
title='Container Breakout (Leaky Vessels)',
severity='high',
url='https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMCONTAINERDCONTAINERDV2-6219725',