So. Abstracted from the powerful high-tech posts on Habré - I applaud them. But the life of an ordinary programmer begins with his workplace, where he tirelessly returns again and again.
If this is about you. If you want to add a little zest to your life - take a break for a minute, relax and discover the habrakat!
Most of us work in the Ubuntu (Linux) environment. This has become a kind of standard for many web developers, it’s like trying once and understanding ... All the magic at the initial stages is limited by the ability to install packages (programs) from under the Terminal command line emulator, then the interest diminishes. But, please ask the question: what is the Terminal window for you? Colorless, soulless shell with a basic set of commands? Or a friend and assistant in everyday affairs? I will tell you a little secret: I personally adapt it for each of my new projects. And all thanks to Alias (alias).
')
Of course, many gurus here will shrug their shoulders condescendingly, but let's not really hurry and make hasty conclusions. After all, sometimes the most obvious things can take different forms and expressions, and I want to share one of these forms with you.
I open my Terminal for you (Ctrl + Alt + T):

I think few readers see the same thing. Configured automatic transition to the root of the project. A list of certain commands that I most often have to use in my work is displayed. Of course, this is a personal matter for everyone, but I have the following list:
PasswordsUsually, the client / customer sends us logins / passwords to their services. At any point in time, it is enough for me to call the
pass command to display all project-related passwords on the console:

Convenient, isn't it?
alias pass=printSecure printSecure() {
Email to exchange bufferLucky people, with an email of the form "a @ a". Of course, I am exaggerating, but on duty, my corporate email is 29 characters long.
Frequent input of such an email has always been a routine for me, and in the end he ended up confusing in a hurry, as luck would have it, in places with two adjacent letters.
The problem disappeared as soon as I created an alias for copying my email to the clipboard. The alias is called succinctly “m”, and costs no more than a second of my time: Alt + Ctrl + T -> m -> Enter -> Alt + F4

mailToClipboard() { echo "vitalyp@softwareplanet.uk.com" | xclip -selection clipboard echo "email vitalyp@softwareplanet.uk.com in clipboard buffer!!" } alias m=mailToClipboard
Wiki ManualThis is a manual for all possible commands that I use during deployment / remote backups, etc. Writes once, but great unloads the brain. I have a copy of this manual still in the textbook, and it opens through a notebook for the alias “snips” (though it’s easier to copy-paste from a notebook), but you can also use the console version:
Edit hosts / .bashrcWhen an action is performed frequently, it can be a good idea to automate this process.
Everything is clear with the hosts file, but I often opened the .bashrc when I wanted to add some kind of crazy new alias to my terminal:
alias edit="gedit ~/.bashrc&" alias hosts="sudo gedit /etc/hosts&"
With the help of an ampersand, the files are opened in a separate thread, and the console is released for further instructions.
Edit temp / dailyTempo file for many can serve as an auxiliary buffer. But I don’t even know from which edge of the screen I have it, because I have an alias:
alias temp="gedit ~/Desktop/temp&"
In the Daily file, I sometimes add notes that will need to be remembered to include in my daily report to the customer:
alias daily="gedit ~/Desktop/daily&"
- I'm afraid that the introductory part is enough. I will add only that I use in work besides these types, still GUI-shnye aliases which display window dialogs on the screen. If anyone is interested, they can try to install the zenity package. A popup window is created like this:
zenity --error --title="Service checker" --text="$service1 is not running! Start it, and click OK."
- Well, and I will hope that this article at least was interesting to someone.