Skip to content

Instantly share code, notes, and snippets.

View caffeinetiger's full-sized avatar

Tony Benavides caffeinetiger

  • Chromatic Ai Swarm
  • Earth
View GitHub Profile
#!/bin/bash
python3 -m venv /path/to/new/virtual/environment
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
eksctl utils associate-iam-oidc-provider --cluster <cluster_name> --approve
aws eks update-kubeconfig --name example --profile named-profile
@caffeinetiger
caffeinetiger / tar_a_directory.sh
Last active April 18, 2022 18:30
[nixCraft - How do I Compress a Whold Linux or UNIX Directory?](https://www.cyberciti.biz/faq/how-do-i-compress-a-whole-linux-or-unix-directory/) [nixCraft - Linux: tar Extract Files](https://www.cyberciti.biz/faq/tar-extract-linux/)
# Compress a directory
tar -zcvf archive-name.tar.gz directory-name
# Extract files
tar -xzvf file.tar.gz
cat /etc/os-release
@caffeinetiger
caffeinetiger / flush_dns_cache.sh
Last active April 18, 2022 18:30
This is a macOS version of ipconfig /flushdns
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
@caffeinetiger
caffeinetiger / main.tf
Last active April 18, 2022 18:30
Example of using data resources to get current AWS region and account id
data "aws_region" "current" {}
data "aws_caller_identity" "current" {}
locals {
aws_region = data.aws_region.current.name
aws_account_id = data.aws_caller_identity.current.account_id
}
-- Grant statements
GRANT LOAD FROM S3 ON *.* TO 'username'@'%';
GRANT SELECT INTO S3 ON *.* TO 'username'@'%';
-- Replace with appropriate Schema, Table, AWS Region Code, and S3 URI
SELECT * FROM some-schema.some-table INTO OUTFILE S3 's3-some-region-code://some-buck-name/some-prefix' FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'