Skip to content

Instantly share code, notes, and snippets.

View OtherDevOpsGene's full-sized avatar

Gene Gotimer OtherDevOpsGene

View GitHub Profile
@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 31, 2023 06:24
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:
@OtherDevOpsGene
OtherDevOpsGene / chef-stacktrace.out
Created June 24, 2020 21:41
Output from TypeError: unable to resolve type 'gid_t' using archive file on Windows 2012R2 Chef Infra Client 16.2.44
Generated at 2020-06-24 21:36:26 +0000
TypeError: archive_file[C:/Users/ggotimer/Documents/archive.zip] (unzip_archive::default line 11) had an error: TypeError: unable to resolve type 'gid_t'
C:/opscode/chef/embedded/lib/ruby/gems/2.7.0/gems/ffi-1.13.1-x64-mingw32/lib/ffi/types.rb:69:in `find_type'
C:/opscode/chef/embedded/lib/ruby/gems/2.7.0/gems/ffi-1.13.1-x64-mingw32/lib/ffi/library.rb:589:in `find_type'
C:/opscode/chef/embedded/lib/ruby/gems/2.7.0/gems/ffi-1.13.1-x64-mingw32/lib/ffi/library.rb:265:in `block in attach_function'
C:/opscode/chef/embedded/lib/ruby/gems/2.7.0/gems/ffi-1.13.1-x64-mingw32/lib/ffi/library.rb:252:in `each'
C:/opscode/chef/embedded/lib/ruby/gems/2.7.0/gems/ffi-1.13.1-x64-mingw32/lib/ffi/library.rb:252:in `attach_function'
C:/opscode/chef/embedded/lib/ruby/gems/2.7.0/gems/ffi-libarchive-1.0.0/lib/ffi-libarchive/archive.rb:158:in `<module:C>'
C:/opscode/chef/embedded/lib/ruby/gems/2.7.0/gems/ffi-libarchive-1.0.0/lib/ffi-libarchive/archive.rb:4:in `<module:Archive>'
C:/opscode/chef/e