Skip to content

Instantly share code, notes, and snippets.

View Jiab77's full-sized avatar
🤖
Search, Hack and Dev

Doctor Who Jiab77

🤖
Search, Hack and Dev
View GitHub Profile
@Jiab77
Jiab77 / real-time-php-fpm-status.md
Last active May 5, 2024 16:13
Real-time PHP-FPM Status

Real-time PHP-FPM Status

This gist will explain you how to enable an undocumented feature of PHP-FPM which will give a real-time performance stats.

Everybody knows the famous phpinfo() and the page it generates, right? Then the real-time PHP-FPM status page design is very similar.

image

Some informations from the top are not displayed to avoid security issues.

Enable PHP-FPM Status

@Jiab77
Jiab77 / setup-nut-and-netdata-on-ubuntu.md
Last active May 2, 2024 11:12
Setup nut and netdata on Ubuntu

Setup nut and netdata on Ubuntu

In this document, I will explain how to setup nut (Network UPS Tools) on Ubuntu 18.04 and 20.04.

It is basically the next chapter of my previous gist, Upgrade nut on Ubuntu 18.04.

I'll only document USB connected UPS and not the other supported connection modes.

Install required dependencies

@Jiab77
Jiab77 / setup-apcupsd-and-netdata-on-ubuntu.md
Created July 3, 2021 17:55
Setup apcupsd and netdata on Ubuntu

Setup apcupsd and netdata on Ubuntu

In this document, I will explain how to setup apcupsd on Ubuntu 18.04 and 20.04.

I'll only document USB connected UPS and not the other supported connection modes.

Remove nut

If you have followed my previous gist related to nut, I'd serisouly recommend you to cleanup everything before continuing this gist.

@Jiab77
Jiab77 / nvidia-elementaryos-loki.md
Last active February 28, 2024 00:28
nVidia drivers installation on ElementaryOS - Loki (ubuntu 16.04 based distrib)

nVidia drivers installation on ElementaryOS - Loki

Introduction

ElementaryOS - Loki is an amazing ubuntu based distribution, I've just felt in love on it BUT they've removed what's required to install easily the nVidia Proprietary drivers. So here is the reason of this gist, to store the install instructions in one place inside a crystal clear documentation.

Check your device

@Jiab77
Jiab77 / raspberry-pi-2-3-and-4-wireless-bridge-ubuntu-server-18.04-arm+netplan.md
Last active February 26, 2024 17:42
Raspberry Pi 2/3B/B+/4B Wireless Bridge using Ubuntu Server 18.04 ARM Image and Netplan

Raspberry Pi 2/3B/B+/4B Wireless Bridge using Ubuntu Server 18.04 ARM Image and Netplan

The initial goal of this project is to use the raspberry pi in place of my Wireless Range Extender and then going from 3 wireless networks (2.4ghz, 2.4ghz extended, 5ghz) at home to only one (5ghz). This way I'm reducing the exposition to radio waves for the whole familly at home.

Let's go technical

Ok, enough drama for now, let's go technical. 😁

Setup

@Jiab77
Jiab77 / create-DNS-over-TLS-bridge-with-pi-hole-unbound-and-stubby-on-ubuntu-server.md
Last active February 25, 2024 03:55
Create DNS-over-TLS bridge with Pi-hole, unbound and stubby on Ubuntu Server

Create DNS-over-TLS bridge with Pi-hole, unbound and stubby on Ubuntu Server

Few months ago, I've made a similar work but I wanted something a little more easier to manage. Please have a look at here for my previous work.

This time, I'm gonna do pretty much the same thing but using Pi-hole as base then modify it to include unbound and stubby.

This way, I can use the power of Pi-hole with some additional security layers:

  • Recursive DNS check (unbound)
  • DNS-over-TLS (stubby)
@Jiab77
Jiab77 / create-expandable-beowulf-cluster-with-slurm-mpich-and-mpi4py.md
Last active January 29, 2024 15:08
Create an expandable beowulf cluster with SLURM, MPICH and MPI4PY

Create an expandable beowulf cluster with SLURM, MPICH and MPI4PY

The goal of this gist is to explain how I have build a Beowulf cluster based on Raspberry Pi models 3B / 3B+ and 4B.

The cluster will be expendable with other device types. Any working computer can be added to the cluster.

Adding the following packages: Ansible, SSHFS, Slurm, MPICH and MPI4PY will give me to possiblity to run parallel computing tasks using all cluster nodes.

The final goal will be to create a low cost computing platform that can be managed with a web interface that I will create soon. Adding remote clients and compute nodes is also a part of this project.

@Jiab77
Jiab77 / bridged-networking-on-wireless-interface-with-kvm.md
Last active January 18, 2024 05:00
Bridged Networking on Wireless Interface with KVM and more...

Bridged Networking on Wireless Interface with KVM and more...

So I needed to upgrade my home "web hosting" server from a Raspberry Pi 3b to something more flexible where I could even simulate a Raspberry Pi 3b given power. The new server hardware is now an Intel NUC i7 16GB / 250Gb SSD NVME. 😁

I order to accomplish this task I had to find a way to bridge the wireless interface which is the faster one on my actual home network setup.

I've also tried to mix the functionnality from another Rapsberry Pi (3b+ this time) who's acting as WLAN to LAN bridge. More details on this setup. But this was finally a bad idea and I was not able to make it work along the virtual network bridge created by libvirt or manually created... (I will explain why later)

The main difficulty was to use the DMZ IP address given by the router and route the traffic to the guest VM's.

Server / Desktop

@Jiab77
Jiab77 / hashcat-brain-on-raspberry-pi-3b-3bplus-and-4b.md
Created August 22, 2020 04:01
Hashcat brain on Raspberry Pi 3B / 3B+ and 4B

Hashcat brain on Raspberry Pi 3B / 3B+ and 4B

This gist will explain how to install and setup Hashcat brain on a Raspberry Pi based cluster.

I've initially tried to use VC4CL instead of POCL but I could not compile it on Ubuntu Server 18.04.5.

Even if I've also compiled CMake as requested, the compilation failed anyway...

Install build dependencies

@Jiab77
Jiab77 / migrate-from-php-to-python.md
Last active December 21, 2023 09:31
Migrate from PHP to Python

Migrate from PHP to Python

Hi all, recently I've decided to move on and learn Python programming. At first, I though that it would be very difficult but in fact... Not that much. So I've decided to write this little gist and show the main differences between both languages.

I will use try to follow the same order used on this website: https://pythonprogramming.net/introduction-to-python-programming/. It was really usefull to improve my understanding of Python programming.

To finish, I'm assuming that you already got basic knowledge in Object Oriented Programming and already got skills and understanding of PHP programming. This is not intended to explain you how to code in PHP but if you're coming from Python programming, then this gist might help you to migrate from Python to PHP.

Official documentations