https://github.com/gitayam/dotfiles
https://github.com/gitayam/dotfiles
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gitayam/dotfiles
- Owner: gitayam
- Created: 2024-11-10T03:28:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-16T11:07:47.000Z (6 months ago)
- Last Synced: 2025-12-19T23:09:16.891Z (6 months ago)
- Language: Shell
- Size: 717 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dotfiles
This repository contains my personal dotfiles for `zsh`, `git`, and other tools, organized by platform and technology.
## 📁 Directory Structure
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 the `zsh` configuration.
## 🎯 Quick Start
1. **Clone the repository:**
```bash
git clone https://github.com/gitayam/dotfiles.git ~/.dotfiles
```
2. **Run the installation script for your OS:**
* **macOS:**
```bash
cd ~/.dotfiles/macos
./install.sh
```
* **Linux:**
```bash
cd ~/.dotfiles/linux
./install.sh
```
3. **Reload your shell:**
```bash
source ~/.zshrc
```
## 🐍 Python & ☕ TypeScript/JavaScript
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.
### Python Scripts
* **`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]`
* **`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]`
### TypeScript/Node.js Scripts
* **`check-env.js`**: A script to check if all required environment variables are set. It reads the required variables from a `.env.example` file in the current directory.
* **Usage:** `node typescript/check-env.js`
### Dependencies
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.txt` file in the same directory. You can install the dependencies using `pip`:
```bash
pip install -r python/requirements.txt
```
* **TypeScript/JavaScript:** The `typescript` directory may contain one or more Node.js projects. Each project will have its own `package.json` file. To install dependencies for a project, navigate to its directory and run `npm install`.
## ⚡ AWS Power Functions
A collection of helper functions to make working with the AWS CLI easier and more intuitive.
### Profile & Region Management
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_PROFILE` environment variable, or `default` if it's not set.
* **Per-Command Overrides:** You can override the profile and region for any command by using the `--profile` and `--region` flags.
```bash
aws_ec2_instances --profile my-other-profile --region us-west-2
```
* **`aws_use_profile `:** Easily switch your active AWS profile for the current shell session.
### New & Improved Functions
* **`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 `**: Start an interactive SSM session with an EC2 instance.
* **`aws_s3_ls [s3://path]`**: A more user-friendly `ls`-like interface for S3 buckets and objects.
* **`aws_cw_logs [--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.
## ☁️ Cloudflare Scripts
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]`
* **`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]`
## Useful Shell Functions and Aliases
This repository includes a collection of useful shell functions and aliases to streamline your workflow.
### Functions
* `extract `: Extracts various archive types (e.g., `.tar`, `.zip`, `.rar`).
* `listening`: Shows which processes are listening on network ports.
### Git Aliases
* `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.
### Docker Aliases
* `d`: Short for `docker`.
* `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.
## 🤝 Contributing
Contributions are welcome! Please open an issue or submit a pull request with your changes.