This repository contains my personal dotfiles for zsh, git, and other tools, organized by platform and technology.
The repository is organized into the following top-level directories:
macos/: Contains installation scripts and configuration files specific to macOS.linux/: Contains installation scripts and configuration files specific to Linux.ansible/: Contains Ansible playbooks for system configuration.python/: Contains advanced, cross-platform Python scripts.typescript/: Contains TypeScript and JavaScript projects and scripts.development/: Contains configurations for development environments, such as Cloudflare workers.scripts/: A collection of useful shell scripts.docs/: Documentation, guides, and notes.assets/: Image assets.shared/: Contains configurations and scripts that are shared across multiple platforms, primarily thezshconfiguration.
-
Clone the repository:
git clone https://github.com/gitayam/dotfiles.git ~/.dotfiles -
Run the installation script for your OS:
- macOS:
cd ~/.dotfiles/macos ./install.sh
- Linux:
cd ~/.dotfiles/linux ./install.sh
- macOS:
-
Reload your shell:
source ~/.zshrc
The python and typescript directories contain more advanced, cross-platform scripts. These scripts are intended to be run directly and are not part of the shell configuration.
-
organize_files.py: A script to organize files in a directory (by default,~/Downloads) into subdirectories based on their file extension.- Usage:
python python/organize_files.py [directory]
- Usage:
-
mac_manager.py: An advanced tool for managing MAC addresses, with features like live vendor lookup, random address generation, and the ability to set MAC addresses.- Usage:
python python/mac_manager.py [command]
- Usage:
check-env.js: A script to check if all required environment variables are set. It reads the required variables from a.env.examplefile in the current directory.- Usage:
node typescript/check-env.js
- Usage:
Before running the Python or JavaScript scripts, you will need to install their dependencies.
-
Python: Each Python script that has dependencies should have a corresponding
requirements.txtfile in the same directory. You can install the dependencies usingpip:pip install -r python/requirements.txt
-
TypeScript/JavaScript: The
typescriptdirectory may contain one or more Node.js projects. Each project will have its ownpackage.jsonfile. To install dependencies for a project, navigate to its directory and runnpm install.
A collection of helper functions to make working with the AWS CLI easier and more intuitive.
The AWS functions now have a more robust and consistent way of handling profiles and regions.
- Automatic Profile Detection: The functions will automatically use the profile set in your
AWS_PROFILEenvironment variable, ordefaultif it's not set. - Per-Command Overrides: You can override the profile and region for any command by using the
--profileand--regionflags.aws_ec2_instances --profile my-other-profile --region us-west-2
aws_use_profile <profile>: Easily switch your active AWS profile for the current shell session.
aws_list_profiles: List all your configured AWS profiles.aws_check_profile: Check the authentication status of the current or a specified profile.aws_ec2_instances: List EC2 instances in a clean, readable table format.aws_ssm_session <instance_id>: Start an interactive SSM session with an EC2 instance.aws_s3_ls [s3://path]: A more user-friendlyls-like interface for S3 buckets and objects.aws_cw_logs <group> [--follow]: Fetch and optionally follow logs from a CloudWatch log group.aws_help: Displays a help message with a list of all available AWS Power Functions.
This repository includes powerful scripts for sharing files using Cloudflare Tunnels and Workers.
-
cffile-hybrid.sh: Share files or directories through a secure tunnel with an optional password protection layer provided by a Cloudflare Worker. This is great for quickly sharing files with a layer of authentication.- Usage:
development/cloudflare/cffile-hybrid.sh [options] [file]
- Usage:
-
cfsecure-integrated.sh: Provides true end-to-end encrypted file sharing. It encrypts files locally before uploading them, ensuring that only someone with the password can decrypt them.- Usage:
development/cloudflare/cfsecure-integrated.sh [options] [file]
- Usage:
This repository includes a collection of useful shell functions and aliases to streamline your workflow.
-
extract <file>: Extracts various archive types (e.g.,.tar,.zip,.rar). -
listening: Shows which processes are listening on network ports.
-
gs: Shows a concise Git status. -
ga: Adds all changes to the staging area. -
gac: Adds all changes and commits with a message. -
gc: Commits with a message. -
glog: Displays a visual and readable Git log graph. -
gp: Pulls and pushes changes. -
gco: Checks out a branch. -
gcb: Creates and checks out a new branch. -
back: Checks out the last branch you were on. -
gd: Shows the Git diff.
-
d: Short fordocker. -
dps: Lists running Docker containers. -
dka: Attaches to a running container. -
dkl: Fetches logs of a container. -
dkL: Fetches and follows logs of a container. -
dcu: Brings up Docker Compose services in detached mode. -
dcd: Brings down Docker Compose services. -
dke: Executes a command in a running container.
Contributions are welcome! Please open an issue or submit a pull request with your changes.