An open API service indexing awesome lists of open source software.

https://github.com/copyleftdev/useful-af.sh

collection of extremely useful shell utility functions designed to turbocharge your command line experience
https://github.com/copyleftdev/useful-af.sh

bash bashrc tools zshrc

Last synced: 3 months ago
JSON representation

collection of extremely useful shell utility functions designed to turbocharge your command line experience

Awesome Lists containing this project

README

        

# 🌈 useful-af - Your Shell Game-Changer πŸš€

Welcome to `useful-af`, the shell utility repository that's quite literally, Useful as F***! Are you tired of Googling for shell commands every now and then? Do you want to pimp your shell like a pro? Say no more, fam! We got you! πŸŽ‰

## 🌟 Why `useful-af`?

- **πŸ”₯ Hot Functions**: Get the hottest, the coolest, and the most awesome utility functions all in one place.
- **πŸ§‘β€πŸ”¬ For Power Users**: These utilities are for you if you live in the terminal but want to chill too.
- **πŸ“ˆ Boost Productivity**: Forget about those repetitive commands. Get things done in a snap!

## πŸ›  Features

### Text & File Operations

- πŸš€ **Fast Text Search**: Find that needle in the haystack codebase with `my_grep`.
- πŸ”’ **Word Count**: Obsessed with words? Count 'em with `count_word`.
- 🧩 **Multi-Pattern Search**: For when one keyword just isn't enough. Use `grep_two_words`.
- 🧹 **De-Dupe Deluxe**: Remove duplicate lines like a wizard with `dedupe`.
- πŸ“‘ **List Largest Files**: Show the largest files lying around with `list_largest_files`.
- πŸ–‹οΈ **Batch Rename Files**: Mass rename your files easily with `batch_rename`.
- πŸ“œ **Search in File Types**: Look for text but only in certain file types with `grep_in_types`.

### Data & Analytics

- 🌐 **IP Extraction**: Be the Sherlock of IP addresses with `unique_ips`.
- πŸ“ˆ **Code Metrics**: Count those Python lines like a boss using `loc_python`.
- πŸ“Š **CSV Magic**: Sum and average like you've never done before with `sum_csv_col` and `avg_csv_col`.

### System & Network

- πŸ’» **CPU Information**: Geek out on your CPU details with `cpu_info`.
- πŸšͺ **Find Open Ports**: Know what's open with `find_open_ports`.
- 🌐 **List Active SSH Connections**: Keep track of your SSH with `list_ssh`.
- 🌐 **Show Public IP**: Know where you stand in the internet world with `my_ip`.

### Utility & More

- 🎨 **Convert Image Formats**: Switch between image formats with `convert_image`.
- 🧾 **Extract Archive**: Unpack stuff efficiently with `extract`.
- πŸ›‘οΈ **Kill Process By Name**: Terminate processes like you're the boss with `kill_process`.
- πŸ“‚ **Monitor Folder Changes**: Be the first to know what changed with `monitor_folder`.
- πŸ” **Search for Aliases**: Quickly find the alias you need with `search_alias`.
- πŸ–ΌοΈ **JSON Prettifier**: Make your JSON readable again with `prettify_json`.
- πŸ“‘ **HTTP Server**: Start a simple HTTP server in any folder with `http_server`.
- πŸ“š **List All TODO Comments**: Keep track of your todos in code with `list_todos`.
- πŸ“ **Base64 Encode/Decode**: Play around with Base64 encoding and decoding using `base64_encode` and `base64_decode`.
- ✨ **Add Alias**: Create a new shell alias on the fly with `add_alias`.
- 🌍 **Add Environment Variable**: Dynamically add a new environment variable with `add_env`.

### Data & Analytics

- 🌐 **Extract URLs**: Extract all URLs from a given website like a crawler with `extract_urls`.

### Weather Utilities 🌦️

- β˜€οΈ **Get Weather by City**: Know the current weather of any city with `get_weather_by_city`.
```bash
# Usage: get_weather_by_city
```

- πŸ›« **Get Weather by Airport**: Travel smart by checking airport weather with `get_weather_by_airport`.
```bash
# Usage: get_weather_by_airport
```

- πŸ—ΊοΈ **Get Weather by Special Location**: Know the weather at famous landmarks with `get_weather_by_special_location`.
```bash
# Usage: get_weather_by_special_location
```

- 🌐 **Get Weather by IP or Domain**: Check weather based on an IP address or domain with `get_weather_by_ip_or_domain`.
```bash
# Usage: get_weather_by_ip_or_domain
```

- 🌑️ **Get Weather by Unit**: Get weather in your preferred unit (metric/imperial) with `get_weather_by_unit`.
```bash
# Usage: get_weather_by_unit
```

- πŸ“ƒ **Get Weather in One Line**: Get a quick one-liner weather update with `get_weather_one_line`.
```bash
# Usage: get_weather_one_line
```

## πŸš€ Getting Started

1. πŸ“¦ Clone this repo.
```bash
git clone https://github.com/copyleftdev/useful-af.git
```

2. πŸŽ‰ Add functions to your `.zshrc` or `.bashrc`.
```bash
cat useful-af/useful-af.sh >> ~/.bashrc
```
```zsh
cat useful-af/useful-af.sh >> ~/.zshrc
```

3. πŸ”„ Reload your shell settings.
```bash
source ~/.bashrc
```
```zsh
source ~/.zshrc
```

4. πŸ₯³ Start using these dope functions!

## πŸ™‹β€β™€οΈπŸ™‹β€β™‚οΈ Contribution

Feel the pull to make this even more awesome? Fork the repo and send a Pull Request! We love new cool stuff!

## πŸ“ License

MIT. Take it, use it, love it.

## 🀘 Final Words

So what are you waiting for? Get `useful-af` and make your terminal the paradise you always wanted it to be!