Skip to content

Instantly share code, notes, and snippets.

View luckylittle's full-sized avatar
:octocat:
Working for @RedHatOfficial

Lucian Maly luckylittle

:octocat:
Working for @RedHatOfficial
View GitHub Profile
@luckylittle
luckylittle / README.md
Created June 29, 2023 09:16
Python transformation of Openshift's ImageContentSourcePolicy. It changes the mirrors based on the source. Useful for cases when you do not need to mirror images, but you just proxy them.

Example of the ImageContentSourcePolicy:

spec:
  repositoryDigestMirrors:
  - mirrors: artifactory-proxy.domain.com.au/redhat-registry-openshift-remote/redhat-openshift-logging-kibana6-rhel8
    source: registry.redhat.io/openshift-logging/kibana6-rhel8
  - mirrors: artifactory-proxy.domain.com.au/redhat-registry-openshift-remote/redhat-openshift-gitops-1-gitops-operator-bundle
 source: registry.connect.redhat.io/openshift-gitops-1/gitops-operator-bundle
@luckylittle
luckylittle / 01-Create and Manage Cloud Resources.md
Last active October 29, 2024 07:39
Professional Google Cloud Architect (2023) -- Cohort ID: PCA02-GETCERT/2023.05.25

Create and Manage Cloud Resources

Creating virtual machine

  • To attach a persistent disk to a virtual machine instance, both resources must be in the same zone
  • If you want to assign a static IP address to an instance, the instance must be in the same region as the static IP

GCloud CLI

@luckylittle
luckylittle / dl_links.csv
Last active August 30, 2024 00:45
Manning Publications Ebooks Downloader
@luckylittle
luckylittle / wayland_brightness.sh
Created May 1, 2023 06:19
Change the brightness of your monitor programatically
#!/bin/zsh
# Turn the monitor brightness down to almost zero
dconf write /org/gnome/shell/extensions/soft-brightness/current-brightness 0.01
# Turn the monitor brightness up to usable value
dconf write /org/gnome/shell/extensions/soft-brightness/current-brightness 0.8
@luckylittle
luckylittle / generate_pdf.sh
Created April 19, 2023 06:08
Beautiful PDF generator out of Markdown powered by podman
#!/bin/zsh
########################################
########################################
## ##
## Author: [email protected] ##
## Takes Markdown file `in.md` and ##
## converts it into a LaTeX PDF !! ##
## ##
########################################
@luckylittle
luckylittle / fedora_upgrade.sh
Last active October 7, 2023 16:42
Typical workflow of Fedora system-wide upgrade to the next releasever
#!/usr/bin/env bash
sudo dnf upgrade --refresh
sudo dnf install dnf-plugin-system-upgrade
sudo dnf system-upgrade download --releasever=37
sudo dnf system-upgrade reboot
sudo dnf install remove-retired-packages
remove-retired-packages
sudo dnf repoquery --unsatisfied
sudo dnf repoquery --duplicates
@luckylittle
luckylittle / fix_icaclient.sh
Created February 17, 2023 04:44
SSL Problems with Citrix ICAClient on Linux
# Error: You have not chosen to trust USERTrust RSA Certification Authority (SSL error 61)
wget http://www.tbs-x509.com/USERTrustRSACertificationAuthority.crt
sudo cp USERTrustRSACertificationAuthority.crt /opt/Citrix/ICAClient/keystore/cacerts/USERTrustRSACertificationAuthority.pem
# alternatively, if it's intermediate put it in /opt/Citrix/ICAClient/keystore/intcerts/
sudo /opt/Citrix/ICAClient/util/ctx_rehash
@luckylittle
luckylittle / procedure.txt
Last active February 16, 2023 01:25
GitOps environment promotion / image version updates
### BEFORE:
lmaly@localhost  ~/Projects/gitops-environment-promotion/envs/staging-asia   main  cat kustomization.yml
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: staging
namePrefix: staging-asia-