Skip to content

Instantly share code, notes, and snippets.

View Gauravtalreja1's full-sized avatar

Gaurav Talreja Gauravtalreja1

View GitHub Profile
@Gauravtalreja1
Gauravtalreja1 / hammer-hack.sh
Created August 7, 2024 16:24 — forked from jeremylenz/hammer-hack.sh
steal partha's hammer settings and get hammer working on devel box
cd ~/hammer-cli-katello
bundle install
bundle exec bash
cd ~
wget https://partha.fedorapeople.org/devel/hammer.tgz
tar zxf hammer.tgz
ll .hammer # verify there's stuff in that dir
cd hammer-cli-katello
hammer ping

Satellite 6 Provisioning Basics


  • Anything involving PXE/iPXE requires the TFTP service. Always.

  • Most PXE/iPXE cannot utilize HTTPS protocol.

  • PXE requires pxelinux.0, provided by the TFTP service. Check permissions, ownership, and contexts of related files:

General OpenSSL Commands

These commands allow you to generate CSRs, Certificates, Private Keys and do other miscellaneous tasks.

Generate a new private key and Certificate Signing Request

openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key
@Gauravtalreja1
Gauravtalreja1 / clean_code.md
Created June 28, 2021 22:20 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

My Openshift Cheatsheet

Openshift build secrets for cloning git repos using SSH Keys

  • To create ssh secret:
oc create secret generic sshsecret \
    --from-file=ssh-privatekey=$HOME/.ssh/id_rsa
def func(self, var):
i = 0
numbers = []
while i < self.var:
print(f"At the top i is {i}")
numbers.append(i)
i = i + 1
print("Numbers now: ", numbers)
print(f"At the bottom i is {i}")
print("-" *20)
class Song(object):
def __init__(self, lyrics):
self.lyrics = lyrics
def sing_me_a_song(self):
for line in self.lyrics:
print(line)
happy_bday = Song(["Happy birthday to you",
"I don't want to get sued",
"So I'll stop right there"])
class Song(object):
def __init__(self, lyrics):
self.lyrics = lyrics
def sing_me_a_song(self):
for line in self.lyrics:
print(line)
happy_bday = Song(["Happy birthday to you",
"I don't want to get sued",
"So I'll stop right there"])