Skip to content

Instantly share code, notes, and snippets.

View dgvigil's full-sized avatar
🏠
Working from home

Dave G Vigil Sr dgvigil

🏠
Working from home
  • ServiceNow
  • Cypress, TX
  • 20:30 (UTC -05:00)
View GitHub Profile
@dgvigil
dgvigil / get_kubeconfig_custom_cluster_rancher2.sh
Created October 29, 2021 17:05 — forked from superseb/get_kubeconfig_custom_cluster_rancher2.sh
Get kubeconfig for custom cluster in Rancher 2.x
#!/bin/bash
# Usage: ./get_kubeconfig_custom_cluster_rancher2.sh cluster_name
# Needs to be run on the server running `rancher/rancher` container
# Check if jq exists
command -v jq >/dev/null 2>&1 || { echo "jq is not installed. Exiting." >&2; exit 1; }
# Check if clustername is given
if [ -z "$1" ]; then
echo "Usage: $0 [clustername]"
@dgvigil
dgvigil / README.md
Created October 25, 2021 19:24 — forked from superseb/README.md
Retrieve kubeconfig from RKE or Rancher 2 custom cluster controlplane node for RKE v0.1.x and Rancher v2.0.x and Rancher v2.1.x
@dgvigil
dgvigil / pass.md
Created September 25, 2021 00:44 — forked from abtrout/pass.md
Using password-store with git repository synching

Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store. For more information about GPG, consult the GNU Privacy Handbook.

Getting started

To get started, install pass and generate a keypair.

$ brew install pass
$ gpg --gen-key
$ gpg --list-keys
@dgvigil
dgvigil / ansible-fact.sh
Created July 30, 2021 15:36 — forked from eby/ansible-fact.sh
Get OS version for an inventory with ad-hoc ansible
# The setup command allows filtering facts
# More info: https://docs.ansible.com/ansible/latest/modules/setup_module.html
# inventory_file = path to inventory file (if not normal role layout)
# host_group = group to query. use all for all hosts
ansible -i inventory_file host_group -m setup -a 'filter=ansible_distribution_version'
# For a Ubuntu Bionic Host the distribution facts look like this:
# "ansible_distribution": "Ubuntu",
# "ansible_distribution_file_parsed": true,
# "ansible_distribution_file_path": "/etc/os-release",
@dgvigil
dgvigil / loki-rancher-rke-helm-values.yml
Created April 15, 2021 19:59
Values file for Helm install of Loki for Rancher Monitoring V2 on RKE2
loki:
persistence:
enabled: true
size: 5Gi
serviceMonitor:
enabled: true
promtail:
enabled: true
extraScrapeConfigs:
- job_name: kubernetes-pods-app
@dgvigil
dgvigil / condaenv.txt
Created February 28, 2018 00:40 — forked from pratos/condaenv.txt
To package a conda environment (Requirement.txt and virtual environment)
# For Windows users# Note: <> denotes changes to be made
#Create a conda environment
conda create --name <environment-name> python=<version:2.7/3.5>
#To create a requirements.txt file:
conda list #Gives you list of packages used for the environment
conda list -e > requirements.txt #Save all the info about packages to your folder
@dgvigil
dgvigil / tmux.md
Created October 12, 2017 20:31 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a