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
- Host: GitHub
- URL: https://github.com/copyleftdev/useful-af.sh
- Owner: copyleftdev
- Created: 2023-10-18T04:35:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-18T19:30:59.000Z (over 1 year ago)
- Last Synced: 2023-10-19T05:33:42.570Z (over 1 year ago)
- Topics: bash, bashrc, tools, zshrc
- Language: Shell
- Homepage:
- Size: 29.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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!