Skip to content

Instantly share code, notes, and snippets.

View OtherDevOpsGene's full-sized avatar

Gene Gotimer OtherDevOpsGene

View GitHub Profile
# set the commiter name and email (which will match the GPG key)
git config --global user.name "Gene Gotimer"
git config --global user.email [email protected]
# only push the branch you are on, and only if the name on the remote is the same
git config --global push.default simple
# delete local copies of deleted remote branches
git config --global fetch.prune true
@OtherDevOpsGene
OtherDevOpsGene / sandbox2.yaml
Created April 11, 2024 13:43
eksctl cluster
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: sandbox2
region: us-east-1
managedNodeGroups:
- name: ng-sandbox2
@OtherDevOpsGene
OtherDevOpsGene / creditcard.js
Created December 4, 2023 21:40
luhn10() implementation
function luhn10(cc) {
let num = normalize(cc);
let sum = 0;
let dbl = true;
let checkDigit = num.slice(-1);
for (let i = num.length - 2; i >= 0; i--) {
if (dbl) {
let val = +num.charAt(i) * 2;
@OtherDevOpsGene
OtherDevOpsGene / oh-my-posh-upgrade.sh
Last active March 14, 2024 00:59
oh-my-posh upgrade
curl -s https://ohmyposh.dev/install.sh | sudo bash -s
sudo rsync -av /root/themes/ /home/ggotimer/.poshthemes/
sudo chown -R ggotimer:ggotimer ~/.poshthemes/
curl -s https://ohmyposh.dev/install.sh | sudo bash -s && sudo rsync -av /root/themes/ /home/ggotimer/.poshthemes/ && sudo chown -R ggotimer:ggotimer ~/.poshthemes/
curl -s https://ohmyposh.dev/install.sh | sudo bash -s
sudo rsync -av /root/themes/ /home/gene.gotimer/.poshthemes/
sudo chown -R gene.gotimer:"domain users" ~/.poshthemes/
$ helm repo add harbor https://helm.goharbor.io
$ helm repo update
$ helm install harbor1 harbor/harbor -n harbor --create-namespace \
--set expose.type=loadBalancer \
--set expose.tls.certSource=secret \
--set expose.tls.secret.secretName=harbor1-certificate \
--set expose.loadBalancer.name=harbor1alb \
--set externalURL="https://harbor1.otherdevopsgene.com"
$ docker run --rm -v "${HOME}/.aws:/root/.aws" -v "${HOME}/.kube:/root/.kube" \
@OtherDevOpsGene
OtherDevOpsGene / old-amis.yml
Created February 25, 2022 21:51
Cloud Custodian read-only report policy that finds used images older than 60 days and unused images older than 14 days.
policies:
- name: old-images-report
resource: ami
comment: |
Report on all used images older than 60 days.
filters:
- type: unused
value: false
- type: image-age
days: 60
<properties>
<dependency.check.cveUrlModified>https://nexus.dhsice.name/repository/nvd.nist.gov/feeds/json/cve/1.1/nvdcve-1.1-modified.json.gz</dependency.check.cveUrlModified>
<dependency.check.cveUrlBase>https://nexus.dhsice.name/repository/nvd.nist.gov/feeds/json/cve/1.1/nvdcve-1.1-%d.json.gz</dependency.check.cveUrlBase>
</properties>
@OtherDevOpsGene
OtherDevOpsGene / ps-colors.md
Last active December 8, 2020 14:39
Changing the color scheme for Windows PowerShell

Changing the color scheme for Windows PowerShell

Install Microsoft ColorTool

Go to microsoft/terminal ColorTool. Download the ColorTool release and extract the zip file.

Download color schemes

Clone mbadolato/iTerm2-Color-Schemes. Copy the contents of the schemes folder into the ColorTool/schemes folder. Keep this page open so you can browse the screenshots to pick a scheme.

@OtherDevOpsGene
OtherDevOpsGene / SELinux.md
Last active January 6, 2025 21:53
SELinux notes from Security-Enhanced Linux for mere mortals and SELinux For Dummies
### Keybase proof
I hereby claim:
* I am OtherDevOpsGene on github.
* I am genegotimer (https://keybase.io/genegotimer) on keybase.
* I have a public key whose fingerprint is 4330 2F2E 58F1 B6D3 7872 5B14 B6C3 B41F 5433 8B9D
To claim this, I am signing this object: