Skip to content

Instantly share code, notes, and snippets.

View riprasad's full-sized avatar
🏠
Working from home

Rishab Prasad riprasad

🏠
Working from home
View GitHub Profile
@riprasad
riprasad / GenerateImageDigestMirrorSet.sh
Created September 4, 2025 14:02
Generate ImageDigestMirrorSet
import os
import requests
import sys
import yaml # pip install pyyaml
# --- CONFIGURATION ---
QUAY_API = "https://quay.io/api/v1"
ORGANIZATION = "rhoai"
TARGET_REGISTRY = "registry.redhat.io/rhoai" # Destination registry path
AUTH_TOKEN = os.environ["QUAY_TOKEN"]
@riprasad
riprasad / dump-restore
Last active September 1, 2023 09:05 — forked from ricjcosme/dump-restore
DUMP / RESTORE PostgreSQL Kubernetes
DUMP
// pod-name name of the postgres pod
// postgres-user database user that is able to access the database
// database-name name of the database
kubectl exec [pod-name] -- bash -c "pg_dump -U [postgres-user] [database-name]" > database.sql
RESTORE
// pod-name name of the postgres pod
// postgres-user database user that is able to access the database
// database-name name of the database
@riprasad
riprasad / increase_root_fedora.md
Last active January 5, 2023 08:30 — forked from 181192/increase_root_fedora.md
How to increase the root partition size on Fedora

How to increase the root partition size on Fedora

Boot up with an Fedora Live USB stick.

  1. Run vgs to check if there's any space:
$ sudo vgs
  VG     #PV #LV #SN Attr   VSize    VFree
  fedora_dhcp35--100   1   3   0 wz--n- <237.28g    0 
#!productVersion=0.0.0
#!milestone=CR1
#!projectVersion=0.1.8.Final
#!scmRevision=0.1.8.Final
#!projectName=apicurio-common-rest-client
#!productName=Red Hat OpenShift Service Registry
#!abbreviation=RHOSR
#!groupConfigName={{projectName}}-{{projectVersion}}
@riprasad
riprasad / sftp.yaml
Created November 2, 2021 19:58 — forked from jujhars13/sftp.yaml
kubernetes pod example for atmoz/sftp
apiVersion: v1
kind: Namespace
metadata:
name: sftp
---
kind: Service
apiVersion: v1
metadata:
#oc apply -f atmoz-sftp.yaml
kind: PersistentVolume
apiVersion: v1
metadata:
name: atmoz-pv
labels:
app: atmoz
spec:
storageClassName: ""
import org.apache.maven.model.Exclusion
import org.commonjava.maven.ext.core.groovy.BaseScript
import org.commonjava.maven.ext.core.groovy.InvocationStage
import org.commonjava.maven.ext.core.groovy.PMEBaseScript
import org.commonjava.maven.ext.core.groovy.InvocationPoint
@InvocationPoint(invocationPoint = InvocationStage.FIRST)
@PMEBaseScript BaseScript pme
String fge = 'com.github.fge'
import groovy.util.logging.Slf4j
import org.apache.maven.model.Build
import org.apache.maven.model.Dependency
import org.apache.maven.model.DependencyManagement
import org.apache.maven.model.Plugin
import org.codehaus.plexus.util.xml.Xpp3Dom
import org.commonjava.maven.atlas.ident.ref.SimpleProjectVersionRef
import org.commonjava.maven.ext.common.ManipulationException
import org.commonjava.maven.ext.common.model.Project
import org.commonjava.maven.ext.core.groovy.BaseScript
import groovy.util.logging.Slf4j
import org.apache.maven.model.Build
import org.apache.maven.model.Dependency
import org.apache.maven.model.DependencyManagement
import org.apache.maven.model.Plugin
import org.codehaus.plexus.util.xml.Xpp3Dom
import org.commonjava.maven.atlas.ident.ref.SimpleProjectVersionRef
import org.commonjava.maven.ext.common.ManipulationException
import org.commonjava.maven.ext.common.model.Project
import org.commonjava.maven.ext.core.groovy.BaseScript
@riprasad
riprasad / Patents.md
Last active February 2, 2023 16:12
Consolidated guide for Patenting Inventions at Red Hat

What ?

A patent is an exclusive right granted for an invention, which is a product or a process that provides, in general, a new way of doing something, or offers a new technical solution to a problem.

Red Hat highly encourages its employees to disclose and submit patent inventions liberally

Why ?

  1. Red Hat wants to build up a patent portfolio for defensive purposes.
  2. It will discourage other companies from suing Red Hat, claiming that we infringe their patents
  3. Such a portfolio will help deter litigation-minded companies from bringing us to court
  4. We will be able to countersue them for infringing our patents