Skip to main content

13 posts tagged with "wsl"

View All Tags

Git - Some tips for your .gitconfig file

6 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Git - Some tips for your .gitconfig file

In this article, we're going to explore some tips for using Git more easily by customising the ~/.gitconfig file.

We'll create a new git undo command to abandon the last local commit.

We'll see how to share Windows Credentials manager with Linux, to have multiple credentials based on your folders structure, ...

We'll also see how to better works with branches like sorting them by commit date instead of their name, to automatically prune (remove) old branches or to force the creation of a new branch on the remote.

Windows Terminal

5 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Windows Terminal

For people who like working in a console, Windows Terminal can be seen as a successor of the old DOS console; you know the black screen where you can type commands like dir or mkdir.

Windows Terminal is a multi-tab software so instead of having multiple windows, you just have multiple tabs but the most killing features for me is the possibility to have a DOS console in one tab, a Powershell one in a second tab, having one or more tabs for Linux and why not, a tab for a SSH connection.

And that feature is really comfortable! Using the same window, you can have multiple active consoles and f.i. share your Linux history between tabs. Pretty cool!

Autosuggestions in the console using ZSH

2 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Autosuggestions in the console using ZSH

ZSH supports plugin and one of the wonders is the zsh-autosuggestions one.

That one will suggests commands as you type based on your previous history and completions.

The more you use your Linux console, the more valuable this plugin will prove to be, as it will learn from you; it will know which commands you have already executed and will suggest them as soon as you start typing the first characters. Finish thinking "Gee, what were the parameters I used for ...".

Syntax highlighting in the console using ZSH

One min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Syntax highlighting in the console using ZSH

zsh-syntax-highlighting is another gem for ZSH.

As you type, you'll be able to tell from the colors that, for example, something isn't quite right.

If you type head followed by a space, ZSH will display this word in green: this command exists and is valid. If you type heat there, the word will appear in red: this command does not exist.

It sounds simple, but it's so practical.

How to install Oh-My-ZSH

5 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

How to install Oh-My-ZSH

ZSH is a powerful alternative to Linux Bash offering a lot of features like auto-completion (I like this so much), plugins and even themes.

The idea here is to empower your Linux console, both the command line like, f.i. new aliases out-of-the-box and make the look and feel even better.

I've chosen Oh My ZSH since years, let's see how to install it followed by a discovering some features.

Customize your Linux prompt with Powerlevel10k

3 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Customize your Linux prompt with Powerlevel10k

When you're working with Linux (also working with WSL thus), there are many ways to personalize your prompt. One of the simplest solutions is to use Powerlevel10k and its wizard.

In this article we're going to use a Docker container just to : test and discard. The Docker container will only be used to install Powerlevel10k, configure it and play with it. After that, it's up to you to see whether you like the interface and, if you do, to redo the installation on your machine rather than in Docker.

The tip comes from here

Starting the default associated Windows program on WSL

2 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Starting the default associated Windows program on WSL

Very often, I'm in my Linux console and I'd like to open a pdf file that I've just generated or, more simply, to open an html file. But how can I do this?

Without knowing the tip that is the subject of this article, at the moment I launch Windows Explorer from my console, I get then the well-known file explorer interface and there I double-click on the file I want to open and leave it to Windows, which knows which program to launch to open this or that extension.

In fact, it's much simpler...

Create your Joomla website using Docker - Part 1

25 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Create your Joomla website using Docker - Part 1

  • Updated 2024-03-23, adding health condition in yml and update Joomla tag to 5.1-php8.2-apache.

In this article, we will learn how to use Docker to install Joomla on your localhost and start a new website in seconds (don't want to wait? Jump to the "Final composer.yaml" chapter).

I will use a Linux console (I'm running WSL on my Windows computer and I have chosen Ubuntu for my distribution) but since Docker can also be used on Windows, you can perfectly run, exactly, the same commands in an MS-DOS / Powershell console.

Using volumes with Docker, use cases

12 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Using volumes with Docker, use cases

When working with a Docker container, data can be persistent or not. Imagine you're creating a localhost website with Joomla, WordPress or any other tool (Laravel, Symfony, etc.).

You've perfectly created the various Docker files needed to run the local site, you've run the command docker compose up --detach to start the containers and now you're busy installing the site. After a few moments, your local site is up and you can start developing its functionalities.

By default, if you haven't taken any precautions, the moment you stop the container (docker compose down), you'll kill your site, i.e. by default, having not taken care to save your data (your site, your database), everything will be lost and reset the next time you run docker compose up --detach. Well... Maybe that was your wish (something totally ephemeral); maybe not;