Skip to content

Your friendly shell companion that supercharges developer productivity with carefully crafted aliases and functions! πŸš€

License

Notifications You must be signed in to change notification settings

mukeshjc/shellmate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ› οΈ shellmate

Your friendly shell companion that supercharges developer productivity with carefully crafted aliases and functions! πŸš€

πŸ“₯ Quick Install

curl -o ~/shelpers https://raw.githubusercontent.com/mukeshjc/shellmate/main/shelpers && echo "source ~/shelpers" >> ~/.$(basename $SHELL)rc && source ~/.$(basename $SHELL)rc

🎯 Features

Aliases

csvtojson

Converts CSV data to JSON format

echo "name,age\njohn,25" | csvtojson
# Output: [{"name":"john","age":"25"}]

files-intersection

Find common lines between two files

files-intersection <(sort users1.txt) <(sort users2.txt)
# Output: Lines that exist in both files

files-difference

Find lines that are in first file but not in second

files-difference <(sort users1.txt) <(sort users2.txt)
# Output: Lines unique to users1.txt

Functions

scpfrom

Securely copy files (recursively if the source is a directory) from your EC2 dev machine to local

scpfrom /remote/path/file.txt /local/path/
# Copies file.txt from EC2 to local path

scpto

Securely copy files (recursively if the source is a directory) from local to your EC2 dev machine

scpto /local/path/file.txt /remote/path/
# Copies file.txt from local to EC2

sync

One-time directory sync between local and EC2 using rsync

sync /local/project/dir /remote/project/dir
# Syncs local directory to EC2

contsync

Continuous background sync of development directories to EC2 (runs every 5 seconds)

contsync &
# Starts background sync process

πŸ’‘ Pro Tips

  • Run contsync & when you want to work locally but keep your EC2 environment in sync
  • The sync interval can be adjusted by modifying the sleep value in the contsync function
  • Make sure your EC2_DEV_MACHINE_IP environment variable is set before using the sync functions

πŸ”§ Requirements

  • SSH key at ~/cloud-dev-server.pem
  • EC2_DEV_MACHINE_IP environment variable set
  • jq installed for csvtojson alias
  • rsync installed for sync functions

🀝 Contributing

Feel free to add your own productivity boosters! PRs welcome! πŸŽ‰

About

Your friendly shell companion that supercharges developer productivity with carefully crafted aliases and functions! πŸš€

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages