Skip to content

Instantly share code, notes, and snippets.

View mancubus77's full-sized avatar
🇦🇺

Mancubus mancubus77

🇦🇺
  • Just a small software company
  • Ku-ring-gai
View GitHub Profile
@mancubus77
mancubus77 / gist:88e3525033962148068cc364ec9bf308
Created November 14, 2023 10:10
How to set private SSH key for git repository
git config core.sshCommand "ssh -i ~/.ssh/id_rsa-gitlab -F /dev/null"
@mancubus77
mancubus77 / laravellocal.md
Created May 22, 2022 01:43 — forked from hootlex/laravellocal.md
Run laravel project locally

##Windows users:

cmder will be refered as console

##Mac Os, Ubuntu and windows users continue here:

  • Create a database locally named homestead utf8_general_ci
from math import floor
class CreatPodList(object):
@staticmethod
def get_antiaffinity(anti_affinity: int) -> int:
"""
Update Anti Affinity if it's blank or none
:param anti_affinity: anti affinity int (input)
:return: anti affinity int (output)
@mancubus77
mancubus77 / cgroups-rhel8.md
Last active October 30, 2023 06:46
Switch RHEL8 to cgroup v2
@mancubus77
mancubus77 / gist:0fff9c8f7e2296798d9fdd12c5d025bc
Created December 20, 2021 11:16
ACM Install on OCP notes
OCP needs to be not lower than 4.8.23 because of Ironc bug https://github.com/openshift/ironic-image/pull/229
AI needs to be installed as part of ACM, not AI itself
isoinfo -x /images/assisted_installer_custom.img -i YOUR_MINIMAL_ISO.iso > assisted_initrd.img.gz # extract the initrd image
gunzip assisted_initrd.img.gz
cpio -idmv --no-absolute-filenames < assisted_initrd.img # this will unpack the archive into the current directory so maybe create a new dir and move there first
Another option is to query the initrd from the image service directly using the following path /api/assisted-install/v2/infra-envs/{infra-env-id}/downloads/minimal-initrd
assisted-service-image Service -> /api/assisted-install/v2/infra-envs/{infra-env-id}/downloads/minimal-initrd

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
apiVersion: app.kiegroup.org/v2
kind: KieApp
metadata:
name: test-server
spec:
environment: rhdm-production-immutable
upgrades:
enabled: true
commonConfig:
adminUser: adminUser

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
@mancubus77
mancubus77 / redhat-pam-dm-notes.md
Created March 6, 2021 12:44 — forked from rafaeltuelho/redhat-pam-dm-notes.md
My Red Hat PAM/DM (jBPM/Drools) random notes

Generating new Projects using maven archetypes

jBPM project

Manually create business application In case you can’t use jBPM online service to generate the application you can manually create individual projects. jBPM provides maven archetypes that can be easily used to generate the application. In fact jBPM online service uses these archetypes behind the scenes to generate business application.

  • Business assets project archetype
org.kie:kie-kjar-archetype:7.46.0.Final
  • Service project archetype
apiVersion: apps/v1
kind: Deployment
metadata:
name: reverse-words
labels:
name: reverse-words
spec:
replicas: 1
selector:
matchLabels: