Skip to main content

WinSCP - Download files with specific extension recursively

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

WinSCP - Download files with specific extension recursively

The WinSCP FTP client support scripting as we can read on https://winscp.net/eng/docs/guide_automation.

In a previous life, I was often faced with the need to download a certain type of file, e.g. connect to an FTP server and retrieve PHP files locally for analysis.

Since WinSCP allows automation, it's easy to write a little script to do just that.

As an example, we'll thus download any .php files from a host.

Docker - Configure your localhost to use SSL

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

Docker - Configure your localhost to use SSL

In a previous article, I've explained how to run a static HTML site in seconds.

The result was a site running on your computer; using http. Let's go one step further and learn how to configure Docker to use https i.e. SSL and encryption.

In this article, you'll learn how to use Apache, nginx and PHP on your machine and be able to start https://localhost.

WinSCP - Visual Basic for Application use

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

WinSCP - Visual Basic for Application use

WinSCP is a free, open-source file manager for securely transferring files between your computer and remote servers using protocols like SFTP, FTP, SCP, and WebDAV.

Did you know that you can call WinSCP from ... VBA code?

See https://winscp.net/eng/docs/library_vb#using. There are also several posts in the forum: https://winscp.net/forum/search.php?mode=results

Running a HTML site in seconds using Docker

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

Running a HTML site in seconds using Docker

Imagine the following situation: you've a HTML website on your computer and you would like to run it. But how? Should you install Apache or Nginx? Yes, you should ... or just run exactly ONE COMMAND to start Docker.

Years ago, to open a local website, it was needed to install f.i. EasyPhp or Wamp, install and configure a lot of things, restart the computer, make sure EasyPhp or Wamp are running in background and ... pffffiou.

Those times are thankfully, definitively over.

Working with regions in VSCode

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

Working with regions in VSCode

VSCode supports region and endregion tags but not everywhere. These two special tags can be written differently depending on the language you're using but have, always, the same objective: allow you to fold part of the code.

Not everywhere means, for instance, VSCode didn't support code folding by default in Dockerfile. Let's see how to solve this.

aeSecure - QuickScan - Free viruses scanner

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

aeSecure - QuickScan - Free viruses scanner

In 2018, I published the first version of my free tool, aeSecure QuickScan.

Still up to date, my scanner detects over 45,000 virus signatures and is optimised for Joomla sites.

aeSecure QuickScan recognises native Joomla files from version 1.0.13 up to version J5.1.0.

Simply download the scanner onto your site, run it from a URL and it will scan the site to quickly identify certain viruses or suspicious signatures.

Linux - Generate documentation from Bash scripts

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

Linux - Generate documentation from Bash scripts

When writing Bash scripts, I'm always putting some description block in front of any functions like I do in any language (think to PHP Docblock).

With PHP, there are a few tools like phpDocumentor for extracting these blocks and generate documentation but do such tools exist for Bash? I don't know, I haven't found any.

So I've written a small Bash script to accomplish this i.e. parse any .sh file present in a folder, extract doc blocks and create one markdown document for any retrieved script. Each function's documentation will then be copied in Markdown, then a table of contents will be appended and, finally, a generic readme.md file will display the list of markdown files retrieved.

Linux - Compare two versions of the same script

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

Linux - Compare two versions of the same script

Still faced with the problem of having to compare two versions of the same script (see the article Linux - Comparing two folders/files in the console), this time we're going to consider that the file we need to compare is a Bash script and that we have two versions of it.

And that we may have made the two files evolve in different ways, i.e. that one or other, or even both, of the files may have been modified.

The aim is therefore to compare the versions and highlight the differences.

Let's revisit the ls command thanks to eza

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

Let's revisit the ls command thanks to eza

Which CLI command would you say you use most on Linux? Most definitely ls to display the list of files in the current directory.

I don't know about you, but I rarely use ls without any parameters. Almost without thinking, I add -alh every time. It's become mechanical.

And then you'll say to me, well, all you have to do is create an alias alias ls="ls -alh"; of course, but let's go further and revisit this basic command and add some functionality to it.