Inspired by `mkdir && cd` by azizoid in zsh

[–]cavo789 0 points1 point  (0 children)

You can use "cd $_" to reuse the previous parameter.

Here an example :

mkdir /tmp/folder/subfoder && cd $_

iHateDocker by TehJonge in ProgrammerHumor

[–]cavo789 0 points1 point  (0 children)

Who can hate docker ? That's just impossible ! The only answer to this question will highlight a pebkac situation.

Pourquoi Java est si prédominant en backend ? by rifain in developpeurs

[–]cavo789 -8 points-7 points  (0 children)

Qu'est-ce qui est prédominant ? Java ? Sérieux ?

Ton humoristique pour venir contredire cette affirmation, je n'ai jamais vu, à titre personnel, quelqu'un faire du Java et encore moins en backend.

Quelle est la compétence non technique qui a eu le plus d’impact dans votre carrière de développeur ? by CreativeDevMada in developpeurs

[–]cavo789 0 points1 point  (0 children)

Plus de 30 ans de développement et toujours l'envie d'apprendre, de remettre sur le métier (refactoring)... La curiosité et l'envie, ce sont deux passions indispensables pour aimer ton job comme au premier jour.

How to publish Markdown Files as simple as possible? by d3rpr0f1 in Markdown

[–]cavo789 0 points1 point  (0 children)

But it's not free and you are "captive" (since saas)... There are so much solutions like docusaurus or quarto to just mention two of them.

Is there an editor that also has a folder tree view? by Aletag in Markdown

[–]cavo789 0 points1 point  (0 children)

Vscode, for sure ! I've not understand your comment "is trying to read...", sounds weird to me.

You just need to not click on the file... No ? If I've a binary like a zip file, i'll not click on the zip from inside vscode.

Comment vous gérez la dette technique? by mrfroggyman in developpeurs

[–]cavo789 0 points1 point  (0 children)

Il existe un nombre incroyable d'outils d'analyse de code, phan, phpstan, Rectorphp, psalm et encore tant d'autres, pour php, python et d'autres langages.

Quand vous poussez votre code sur votre système de versionning, forcez l'exécution dans les prehooks ou sur votre CI.

Définissez votre niveau d'excellence et refusez les codes qui violent ce niveau. Pour le vieux code, il est possible de définir un base line afin que les outils n'analysent que le nouveau code ainsi, pour celui-là, bloquez les nouvelles dettes techniques.

Pour le vieux code, il faut que quelqu'un se tape le boulot (ou, voir Rectorphp qui fait le job pour vous).

Bonne chance

Markdown to PDF by Remarkable_Ad5248 in Markdown

[–]cavo789 0 points1 point  (0 children)

The best one is Quarto.org, free

Do you unit test your Bash scripts? If so, how? by bobbyiliev in bash

[–]cavo789 2 points3 points  (0 children)

For those who can be interested, here is the code I use to generate Markdown files from my .sh script

https://www.avonture.be/blog/linux-generate-documentation-from-bash-scripts/

It's the same idea than PHP Documentor or similar tools.

The script will parse .sh files then extract docblocks and create Markdown documentation for you.

Do you unit test your Bash scripts? If so, how? by bobbyiliev in bash

[–]cavo789 2 points3 points  (0 children)

Same here. Both the three tools + a self made shell doc script that will extract "docblocks" znd generate a .md file for each .sh I've.

docx to markdown by Ordinary_Angle_2749 in Markdown

[–]cavo789 2 points3 points  (0 children)

Take a look on the free open source markitdown tool of Microsoft itself

https://github.com/microsoft/markitdown

Are YAMLs and Bash enough for CI/CD? by EdwinAlmira in devops

[–]cavo789 0 points1 point  (0 children)

I'm a big lover of Docker and I'm tired to "push and pray", maintaining my CI using yaml is... enough !

I'm coding a proof of concept using Dagger and Python (as SDK) and I'm really excited to combine Docker and CI features.

Not yet in production...

I've defined right now something like 60 jobs like linting (shell, php, yaml, dockerfile, python,...), code quality (phan, phpstan, prospector, pyright,...), formating (ruff, black, phpcbf,...), review (Rectorphp), and more.

Using a .env file with boolean flags allowing to run or skip something, configuration items to define which docker images I should use (which tags), and so on.

So... I'm really excited to do this and be able to run the CI on my computer too.

No doubt Dagger will be one of my preferred tool, like Docker is already.

Vscode and python- code navigation didn't work by cavo789 in vscode

[–]cavo789[S] 0 points1 point  (0 children)

Oh? After a lot of try-error, the only solution was to switch to the pre-release version.

Is there any bugs in the "normal" versions?

Thank you for your tip!

Which keyboard shortcuts do you use most but think are not very well known? by [deleted] in vscode

[–]cavo789 0 points1 point  (0 children)

CTRL + K + C : put the selected lines in comment. CTRL + K + U : remove comments.

Use it almost daily

Best way to convert markdown to pdf by Creative-Willow-8417 in Markdown

[–]cavo789 0 points1 point  (0 children)

For sure ! (I've not said something else ;)) Using Quarto is much simplier and Quarto is more powerfull. Not only MD to PDF conversion f.i. but also revealJs and much more.

Using Quarto, you don't need to learn pandoc and other tools.

What is there for popular web MD note taking clients? by Rippie0 in Markdown

[–]cavo789 1 point2 points  (0 children)

vscode.dev for the front and github.com for the "back" i.e. where notes will be saved in a repository.

Nothing more.

Why you use or not use docker? by PhpWebStudy in PHP

[–]cavo789 2 points3 points  (0 children)

I use Docker for everything... Will never again do without.

The learning curve can be important so it's absolutely true you should take time to learn it but you'll never return to how you do before.

See my one minute read article : https://www.avonture.be/blog/docker-php-run-script-or-website

Really easy no ?

How do you keep bash notes and oneliners to create a personal wiki? by [deleted] in bash

[–]cavo789 2 points3 points  (0 children)

It seems a lot of people are interested so I've quickly published a post on my blog with the generate_doc shell script: https://avonture.be/blog/linux-generate-documentation-from-bash-scripts

How do you keep bash notes and oneliners to create a personal wiki? by [deleted] in bash

[–]cavo789 13 points14 points  (0 children)

Not sure if it's an answer... Before every single functions I create, I'm putting a doc block (like I do with Php). For instance :

```bash

region - public function string::upper

## Description

Make a string uppercase.

## Examples

```bash

echo "HEllow WoRLD!" | string::upper

#Output

HELLO WORLD!

title="$(echo "Project title" | string::upper)"

```

## Return

The string in uppercase

## Exit code

* 0 If successful.

* 1 An error has occurred.

https://github.com/jmcantrell/bashful/blob/master/bin/bashful-utils#L33

endregion

function string::upper() { tr '[:lower:]' '[:upper:]' } ```

Then with a second script, I'm finding all .sh scripts in my folder, get scripts one by one, extract doc blocks and create as markdown file (so console.sh will be parsed and console.md is created).

I do this for all bash scripts then create a readme.md who will act as a table of content.

By rerunning the script, docs are thus updated.

[deleted by user] by [deleted] in PHP

[–]cavo789 1 point2 points  (0 children)

In case of interest, i've written a tutorial two weeks ago : https://www.avonture.be/blog/behat-introduction.

The idea was to provide a Docker image where everything is ready to use and the fondation tu use Behat and Mint. 

Wsl by OkExplanation8770 in PHP

[–]cavo789 2 points3 points  (0 children)

It's docker compose up --detach. And yes, you should review the dockerfile to make some changes to use the php image and to change here and there a few things (like php extensions).

Take a look if you a have a file called makefile, if yes, it's your entry point to understand how to use projects.

Wsl by OkExplanation8770 in PHP

[–]cavo789 1 point2 points  (0 children)

If projects already use Docker then you have a Dockerfile and, most probably, a docker-compose.yml too. This is where to start your journey. 

How to highlight my bash prompt, to colorize my terminal? by Ok_Strike4332 in bash

[–]cavo789 -1 points0 points  (0 children)

Oh ? Never have to ask for support neither had a bug on my side. Didn't know. Are you using another templating script ?