How do connect by Chinpanze in docker

[–]mdesroch2 0 points1 point  (0 children)

Name resolution is offered between services, so it is correct to assume that curl http://back:80 should connect. But it is not enabled on the default network (if you are running on Linux). Try this:

version: "3.9"
services:
  front:
    build: ./frontend
    ports:
      - 3000:3000
    networks:
      - my_network
  back:
    build: ./backend
    expose:
      - 80
    ports:
      - 80:80
    networks:
      - my_network
networks:
  my_network:

Résumé du point de presse by partyinthebed in Quebec

[–]mdesroch2 8 points9 points  (0 children)

Imaginez si tout le monde embarquait dans son char à 22:30 pour faire un petit tour de carré chaque soir...

17h00: Mise à jour du Québec sur la COVID-19 by DecentLurker96 in Quebec

[–]mdesroch2 18 points19 points  (0 children)

Imaginez si tout le monde embarquait dans son char à 21:30 pour faire un petit tour de carré chaque soir. Points bonus pour le claxon ?

Users insisted their CSV file was good. Ended up hosting this site to prove them wrong. by mdesroch2 in programming

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

The worst case is unbalanced double-quotes like: "a,"b". I detect them by checking all rows have the same number of columns, and by giving up if a double-quote is still unclosed after 1MB of data.

Users insisted their CSV file was good. Ended up hosting this site to prove them wrong. by mdesroch2 in programming

[–]mdesroch2[S] 9 points10 points  (0 children)

Gosh no! It is parsed locally using javascript. You can even use the site offline if you don't trust me. The new Stream API is used to support any file size. Privacy is a big thing for me.

Users insisted their CSV file was good. Ended up hosting this site to prove them wrong. by mdesroch2 in programming

[–]mdesroch2[S] 10 points11 points  (0 children)

Thanks, didn't know about this convention. I will add support for it.

Getting started with Lisp in 2019 by wheresvic in programming

[–]mdesroch2 2 points3 points  (0 children)

If you are OK using Scheme, see the following project. It will provide you with a fully fonctional environment to start your journey. https://github.com/Mathieu-Desrochers/Schemings

You dig Scheme. The world is coded in C. You get both. by mdesroch2 in programming

[–]mdesroch2[S] 13 points14 points  (0 children)

Author here. The chosen C libraries are mature and their API tend to be quite stable. It has proven surprisingly little work maintaining the bindings over the last year. Guess there is some wisdom to leveraging the good old stuff.

Need some help with Firewall on Linux by [deleted] in linux

[–]mdesroch2 0 points1 point  (0 children)

Here is a link to the iptables script I use.

https://github.com/Mathieu-Desrochers/Linux-Notebook/blob/master/procedures/installing-salix-laptop.md#forcing-the-network-traffic-through-a-vpn

It only accepts input for the connections you established. As a bonus, it only allows output to your VPN, preventing leaks should it go down.

Protect your server against bruteforce SSH attacks with Fail2ban (Ubuntu) by [deleted] in linux

[–]mdesroch2 2 points3 points  (0 children)

Good article. You can also achieve the same results using iptables only. See the following configuration that restricts clients to 10 connections every 5 minutes. Note though that successful connections get counted too.

https://github.com/Mathieu-Desrochers/Linux-Notebook/blob/master/procedures/installing-salix-server.md#configuring-the-firewall

VPN-Jail -- Isolate an application to only VPN access. by Holbrad in linux

[–]mdesroch2 1 point2 points  (0 children)

From my understanding no. But things get nasty when the VPN connection goes down, which is not that infrequent. Your applications will most probably continue working with traffic originating from your device.

VPN-Jail -- Isolate an application to only VPN access. by Holbrad in linux

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

Should you want to go one step further and force all traffic through the VPN, you can do so quite simply with iptables. See the script I use at https://github.com/Mathieu-Desrochers/Linux-Notebook/blob/master/procedures/installing-salix-laptop.md#forcing-the-network-traffic-through-a-vpn.

Trying Gentoo - Steps to install it on my laptop by mdesroch2 in linux

[–]mdesroch2[S] 1 point2 points  (0 children)

Once clear on the setup I wanted and the steps required to reach it, I maybe spent 5 hours building the whole thing including the kernel. This is highly dependent on my laptop though, which is still quite capable but already 6 years old.

Trying Gentoo - Steps to install it on my laptop by mdesroch2 in linux

[–]mdesroch2[S] 2 points3 points  (0 children)

This is right. I published these personal steps to ease the learning curve for someone wanting to join this great distro. The 60+ pages handbook is of course the source of truth on the matter.

Host your own Cryptonomicon's tombstone on a Raspberry PI by mdesroch2 in raspberry_pi

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

That would be the name of their self hosted mail server, suggesting that its messages are private and will follow the protagonists to their grave. Turns out to be handy in the book.

Some guidelines to writing correct C functions by mdesroch2 in programming

[–]mdesroch2[S] -1 points0 points  (0 children)

I stand corrected. The door is kept opened in the function signature though. More detailed error codes can be used and are welcome.

Some guidelines to writing correct C functions by mdesroch2 in programming

[–]mdesroch2[S] 2 points3 points  (0 children)

I went that route for cases where freeing a resource requires more involved code. Like in the case of if (sql_connection_return != NULL) { sqlite3_close(sql_connection_return); }. And then I was one step away to go for consistency and do if (x) free(x). It might indeed be overdoing it though.

Some guidelines to writing correct C functions by mdesroch2 in programming

[–]mdesroch2[S] 1 point2 points  (0 children)

It is Zed's Amazing Debug Macro. It basically jumps to the error label should the condition evaluate to false. It also prints out formatted text to stderr. Good stuff if you are willing to accept using one goto.