How to be productive in linux shell?

how to be productive in linux shell?
i already installed tmux and it's been great
what else should I install

Attached: 1558181758452.jpg (300x250, 89K)

Other urls found in this thread:

youtube.com/watch?v=qgG5Jhi_Els
blog.jessfraz.com/post/docker-containers-on-the-desktop/
github.com/mikadosoftware/workstation
inanzzz.com/index.php/post/wqfy/a-makefile-example-with-docker-compose-commands
twitter.com/AnonBabble

Install GNU Emacs.

T. Shell power user here.

I'm a software dev, so what will follow may be very specific to programming.

Here are my most precious tips :

- Wait a few more weeks for the tmux shortcuts to go in your memory muscle. You'll feel another productivity boost.

- Then, learn about how to automate your workflow. Here are my main tools :

* fzf. The main game changer to be honest.
This little piece of software right here can be combined with almost any other ones on the CLI, thanks to the UNIX philosophy.
Learn it with this video : youtube.com/watch?v=qgG5Jhi_Els


* tmuxinator : Very handy once you master tmux. You switch and open projects in literally one command.

* bash aliases : they allow you to shorten the commands you type in a way that works for you to remember them well.

* docker and docker-compose : Extremely useful to create static images of your tools. One of the game changer of the decade in it, run huge project in one command with it.

* vim : Honestly, best investment I've made in years. It will feel painful at first, but practice it like you would practice a musical instrument and text editing will become a second nature for you. Use plugins for templates and snippets.


Finally, most importantly, read articles and learn how to combine all those tools above, find more of them, and all their tips and hacks.


Be mindful about EVERY CHARACTER you type, and try to find a way to type less for every action.
You'll probably never go back, and you'll feel like Windows and Mac OS are toys when you need to use them.
And all your colleagues (if you have some) will literally be in awe in front of your workflow.
And remember, this whole process just requires patience and determination.

Attached: acb03401129aa1b7c3bac222a657ebea.jpg (1920x1200, 640K)

Why the fuck are you using tmux when you have a perfectly good window manager. The only time I take advantage of tmux is for multi-tasking in a pinch when working remotely.

The idea of being productive in an environment implies that you are getting some work done in that environment. To be productive in a shell, use the shell to do work. Installing bash-completion and learning the arcane bash hotkeys and how to use history search can help you do stuff faster.

Assuming you are already comfortable with pipes, job control, and finding things in the manual.

ripgrep. It's the best tool in existence.

>* docker and docker-compose : Extremely useful to create static images of your tools. One of the game changer of the decade in it, run huge project in one command with it.
Please elaborate on this.

One word : automation.
As a developer, you should be lazy.
KISS DRY.

I know that my opinion will probably be unpopular here, because for incoherent reasons a lot of people hate Docker on Jow Forums, but it really is the best thing that happened to software in the last decade.
It’s an extremely powerful tool allowing you to make repeatable development, build, test, and production environments in a single file.
I primarily use it for a much different purpose: to simplify my workstation setup.
A lot of clever people use it as their workstation, so I began to do the same, and it indeed works extremely well.
I run vim, git, fzf, ripgrep, htop and many others software in Docker. I can recreate my whole stack in a single command when I switch to a new computer or I reinstall mine. It’s even more powerful with the help of a Makefile to create aliases. I just run make install and i’m done.
I put it in a Jenkins to make sure the image is always building and up to date.

Here are some references :
blog.jessfraz.com/post/docker-containers-on-the-desktop/
github.com/mikadosoftware/workstation
inanzzz.com/index.php/post/wqfy/a-makefile-example-with-docker-compose-commands

Attached: 1537516375824.jpg (1200x1200, 440K)

Thanks mate

thanks user I appreciate your insight

Best post of Jow Forums in the last decade. Thanks.

I gave those articles a (very) quick read, but how do I actually get my code and whatnot? Exclude it from docker and pull it from GitHub whenever I'm on a new machine? Or keep it together with my docker image? Also, what are the limitations of this approach?

This is autistic and the opposite of productive.

You'd literally need to know the ins and out of every application before you can wrap it successfully, or go through dozens of trial and error cycles where the application just fails.

If your set of tools never changes and grows then you might be fine, but noone using 10 year old tools is going to be considered productive.

Also if you need to re-construct a system, you literally just need to copy data directories (/home/ and whatever else you care to keep around), generate a diff of your /etc directory, and apt-mark showmanual > packages.txt to be restored on the clone system by apt install $(cat packages.txt).

If you need to ditch all of your application settings regularly for whatever reason, then you can start giving a fuck about the state of your home directory and cherry-picking files to preserve.

>And all your colleagues (if you have some) will literally be in awe in front of your workflow.
Right, earlier this week, I awed someone with little more than talking about what someone who can into text editing (like him) might do to efficiently duplicate a line in a typical editor, from a starting position somewhere near the middle of the line (e.g., home, shift-end, ctrl-c, end, return, ctrl-v) - followed by demonstrating yyp in Vim.

In most text editors you can just Ctrl+C then Ctrl+V from anywhere on the line. Just sayin

Anyone who has used a computer for a significant amount of time will be able to execute that combination of keystrokes in about a second, and its transferable across all applications.

It'll take the special snowflake vimfag longer on average to remember the unintuitive and arcane sequence of keys to achieve a single specific action; or at least never save enough time to justify the initial investment.

I bet they were in awe at how much fucking time you wasted memorizing a secondary set of keyboard controls for a single app just to be able to do what they do in the exact same amount of time.

>* vim : Honestly, best investment I've made in years. It will feel painful at first, but practice it like you would practice a musical instrument and text editing will become a second nature for you. Use plugins for templates and snippets.

But what about

EMACS

I could make a tutorial to show you guys how my stack works. I will, if I find the time to.
You indeed keep it together with your docker image, your Dockerfile more precisely.

Learn the basics of Docker first with a tutorial.
It all begins with a file called 'Dockerfile' where you write your Docker image (what you want to get inside of your Docker images, and the all the commands you want to run on it).
Use the 'COPY' directive to copy your code inside of it. Those files are in the same folder.

Also advise you to put all of your file under version control.
Create an account on Gitlab or Bitbucket and upload your repository there.

So when you (re)install your stack, you just have to clone your git repository from there, and run the install command.
Limitations I experienced :
It’s hard to make some GUI softwares work inside Docker. Wasn’t really made for this in the first place. But works like a charm if your workflow is CLI based like mine.
As said, You'd need to know the ins and out of every application. My approach is extremely powerful, only if you are a quite advanced Linux (power) user.

> … set of tools never changes and grows, using 10 year old tools is going to be considered productive.
That’s why I cron’d a Jenkins job building it every hour. I also tag the version of every software.
I just revise my Dockerfile regularly, so I don’t have any bad surprise, and my tools are always up to date.
Here is an extract of my Dockerfile :

ARG JPEGOPTIM_VERSION=1.4.6-r0
ARG OPTIPNG_VERSION=0.7.7-r0

RUN apk add --no-cache jpegoptim=${JPEGOPTIM_VERSION}
RUN apk add --no-cache optipng=${OPTIPNG_VERSION}


Yes, we could also use this approach, but it’s much harder to test (that’s why I use a Jenkins building my Dockerfile), and because of the updates of your OS at the time of your next reinstallation, you won’t obtain the same exact environment

Attached: 56614179_454841241953973_8255198457407682071_n.jpg (480x480, 28K)

Thank you from the bottom of my heart.
Best posts I have seen in recent months.
Glad to see that there are still smart people left on this board.

I'd just like to interject for a moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.

Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called "Linux", and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.

There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called "Linux" distributions are really distributions of GNU/Linux.

Attached: 1491967755198.jpg (516x461, 44K)

He's talking about a Linux shell, dumbass

Nice. Please, make a video of your workstation.

A tutorial format might be a little lost in the noise, but any co tent you'd like to produce would be helpful to me too.
I am a hobby programmer without much time for diving deep into things, but I've had it on my to-do list to automate the building of my workspace as well. Having just jumped into docker after avoiding it these last few years, I would say that my problem around their docs is that the information there isn't super discoverable, which has slowed my work down with all the context switching that life brings.

> RUN apk add ...
Alpine gang. Amazing distro.

Also excellent replies.

>not GNU/Screen

Attached: 1339550542691.jpg (1024x768, 294K)

printf \\ec && neofetch --ascii "$(fortune | cowsay -W 40)"

can your gui wm works over ssh easily?