Category Archives: Unix

Gitea hardening and healthchecks.io

A friend of mine asked some insight on how to harden a Gitea server on Internet. Gitea is a web application for manging git repositories. Gitea is quite compact and is less feature-rich than GitLab, but it is light and … Continue reading
Posted in DevOps, English Content, IT Featured, Knowledgebase, Unix | Tagged | Leave a comment

Bash Regular expression replace (regexp)

You can easily use bash to search-and-replace on variables… f="/home/alice/myfile.md" $ echo ${f//.md/.pdf} /home/alice/myfile.pdf $ echo ${f//alicee/bob} /home/alice/myfile.md $ echo ${f////-} -home-alice-myfile.md  
Posted in English Content, Knowledgebase, Unix | Tagged , | Comments Off on Bash Regular expression replace (regexp)

Let PiHole play nice with docker-compose

When you run pihole in a docker container, it could be difficult to build images on the same docker daemon, because docker-compose cannot pass DNS request to another container during build, and normal dns resolution fixes won’t work. I solved … Continue reading
Posted in DevOps, IT Featured, Knowledgebase, Unix | Tagged , | Comments Off on Let PiHole play nice with docker-compose

Bash TCP conection feature

Bash support tcp connection out of the box :)   So you can write something like #!/bin/bash webhost="gioorgi.com" exec 5<>/dev/tcp/$webhost/80 echo -e "GET / HTTP/1.1\r\nHost: $webhost\r\nContent-Length: 0\r\n\r" >&5 # get reply: HTTP/1.1 301 Moved Permanently^M cat <&5  
Posted in IT Featured, Unix | Tagged , | Comments Off on Bash TCP conection feature

Fail2Ban

On these days I decided to tune a bit more, my new shiny linux server box. I started to set up fail2ban. I think fail2ban is very imporant nowadays because it is a good example of a tool for slowing … Continue reading
Posted in English Content, Knowledgebase, Unix | Tagged , , | Comments Off on Fail2Ban

RaspberryPi 2: The perfect box for your backpack

After my two children grow a little, I have some spare time to play with RaspberryPi. I have bought a Raspberry Pi 2 Model B, a very neat and compact machine with 1GB of RAM, and a quad-core ARM chip … Continue reading
Posted in Arduino, English Content, IT Featured, Knowledgebase, Unix | Tagged , , | Comments Off on RaspberryPi 2: The perfect box for your backpack

Debian perfect work environment

Working in a big company, my work laptop came with MS-Windows7 Enterprise installed. But as you imagine, Unix is my preferred desktop environment. So let’s how to configure a perfect Debian Linux for a old wolf consultant like me. You … Continue reading
Posted in English Content, IT Featured, Software, Unix | Tagged , , , , , , | Comments Off on Debian perfect work environment