Skip to content

Instantly share code, notes, and snippets.

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

Joaquin Menchaca darkn3rd

🏠
Working from home
View GitHub Profile
@darkn3rd
darkn3rd / vagrantfile.rb
Last active September 13, 2023 17:46
Vagrantfile for Dynamic MultMachine
View vagrantfile.rb
# -*- mode: ruby -*-
# vi: set ft=ruby :
# default constants
TIME = Time.now.strftime('%Y%m%d%H%M%S')
CONFIGFILE_HOSTS = './config/hosts'
VAGRANT_BOX = 'bento/ubuntu-14.04'
# build hosts hash
hosts = {}
@darkn3rd
darkn3rd / Arch-VirtualBox.md
Last active July 10, 2023 14:32
Arch Linux as VirtualBox Guest
View Arch-VirtualBox.md

ArchLinux Virtualbox STEP-by-STEP

These are my ArchLinux on Virtualbox notes with some added explanations.

  • Joaquin Menchaca (Nov 6, 2017)

Create Virtualbox System

This is handcrafted creation of using Virtualbox using defaults with these adjustments:

@darkn3rd
darkn3rd / get_eksctl_ebs_policy.sh
Created May 6, 2023 18:38
Get Inline Policy Attached to Node IAM Role
View get_eksctl_ebs_policy.sh
EKS_CLUSTER_NAME=${EKS_CLUSTER_NAME:-"my-cluster"}
NODE_GROUP=$(aws eks list-nodegroups \
--cluster-name $EKS_CLUSTER_NAME \
| jq -r '.nodegroups[0]'
)
ROLE_ARN=$(aws eks describe-nodegroup \
--cluster-name $EKS_CLUSTER_NAME \
--nodegroup-name $NODE_GROUP \
| jq -r '.nodegroup.nodeRole'
)
@darkn3rd
darkn3rd / provision.md
Last active April 28, 2023 15:44
Pedantic ADHD Guide to Kubernetes Provisioning
View provision.md

Pedantic ADHD Guide to Kubenretes Provisioning

This is my guide for how to get Kubernetes provisioned using Azure, Google Cloud, or AWS using CLI tools. This will require setting up an account with local CLI tools. The goal of this is to quickly set up a disposable test clusters in minimalist way.

The Tools

Some tools used here:

  • General
  • direnv (direnv) - used to setup environment variables automatically
@darkn3rd
darkn3rd / prepare_iso_notes.md
Last active January 12, 2023 05:25
Mac OS X Prepare ISO
View prepare_iso_notes.md

Prepare ISO Notes

These are notes on this process to prepare an install CD so that you can create a virtual Mac OS X. This is useful for testing scripts.

Prepare ISO Script

#!/bin/sh -e
#
# Preparation script for an OS X automated installation for use with VeeWee/Packer/Vagrant
@darkn3rd
darkn3rd / SQL Cheat Sheet.md
Created January 4, 2023 12:27 — forked from janikvonrotz/SQL Cheat Sheet.md
SQL Cheat Sheet#SQL#Markdown
View SQL Cheat Sheet.md

SQL languages

DDL is short name of Data Definition Language, which deals with database schemas and descriptions, of how the data should reside in the database.

DML is short name of Data Manipulation Language which deals with data manipulation, and includes most common SQL statements such SELECT, INSERT, UPDATE, DELETE etc, and it is used to store, modify, retrieve, delete and update data in database.

DCL is short name of Data Control Language which includes commands such as GRANT, and mostly concerned with rights, permissions and other controls of the database system.

Datatypes

Text types

@darkn3rd
darkn3rd / certifications.md
Created July 28, 2022 02:46
Joaquin's Cloud Native Certification List
View certifications.md

Joaquin's Cloud Native Certification List

2022年07月27日

These are cloud certifications for Cloud Native Computing topics in operations and development.

Hashicorp

  • Certifications
@darkn3rd
darkn3rd / publish_to_docker.sh
Last active October 13, 2022 07:25
GKE/CCSM: Publishing pydgrpah-client images to DockerHub
View publish_to_docker.sh
pushd ./examples/pydgraph-client
###################
# STEP 1: Environment variables
#######################################
source env.sh
export DOCKER_REGISTRY="<your-docker-hub-account-goes-here>"
###################
# STEP 2: Build local image
@darkn3rd
darkn3rd / create_projects.sh
Created October 12, 2022 08:01
GKE/CCSM: projects
View create_projects.sh
# enable billing and APIs for GKE project if not done already
gcloud projects create $GKE_PROJECT_ID
gcloud config set project $GKE_PROJECT_ID
gcloud beta billing projects link $GKE_PROJECT_ID \
--billing-account $ClOUD_BILLING_ACCOUNT
gcloud services enable "container.googleapis.com"
@darkn3rd
darkn3rd / env,sh
Created October 12, 2022 08:00
GKE/CCSM: env.sh
View env,sh
# gke
export GKE_PROJECT_ID="my-gke-project" # CHANGE ME
export GKE_CLUSTER_NAME="csm-demo"
export GKE_REGION="us-central1"
export GKE_SA_NAME="gke-worker-nodes-sa"
export GKE_SA_EMAIL="$GKE_SA_NAME@${GKE_PROJECT_ID}.iam.gserviceaccount.com"
export KUBECONFIG=~/.kube/$GKE_REGION-$GKE_CLUSTER_NAME.yaml
# other
export USE_GKE_GCLOUD_AUTH_PLUGIN=True