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 January 13, 2025 13:36
This gist will explain you how to enable an undocumented feature of PHP-FPM which will give a real-time performance stats.

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 / goaccess-install-on-ubuntu-server-18.04.md
Last active June 27, 2024 21:06
The default install options are pretty good for standard usage but for advanced one, you need to go to the compilation option...

GoAccess install on Ubuntu Server 18.04

The default install options are pretty good for standard usage but for advanced one, you need to go to the compilation option...

Compile GoAccess

You will have to install some dependencies first.

sudo apt install libncursesw5-dev libglib2.0-dev libgeoip-dev libtokyocabinet-dev libbz2-dev libssl1.0-dev
@Jiab77
Jiab77 / bridged-networking-on-wireless-interface-with-kvm.md
Last active March 15, 2025 17:54
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. 😁

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 / ntopng-install-on-ubuntu-server-18.04.md
Last active October 16, 2022 05:06
Ntop-ng Install on Ubuntu Server 18.04 (written for Raspberry Pi but can be used on any other platforms)

Ntop-ng Install on Ubuntu Server 18.04

Instructions are written for Raspberry Pi but can be used on any other platforms.

As there is no pre-built packages for ARM platforms I've found some packages but you might have no other choices than do the compilation yourself... πŸ˜…

Pre-Built packages

I've finally been able to get the hand on their pre-built packages... I've just read too fast their documentation... :face_palm:

You could find their packages here: http://packages.ntop.org/

@Jiab77
Jiab77 / samsung-printer-c480w-net-install.md
Last active October 31, 2024 12:17
This is a short guide to keep track on how to setup this damn printer πŸ˜…
@Jiab77
Jiab77 / migrate-from-php-to-python.md
Last active June 27, 2024 21:08
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.

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

@Jiab77
Jiab77 / install-elementary-os-juno-on-secureboot-efi-enabled-computer.md
Last active June 27, 2024 21:08
I was really happy to know that the latest version of ElementaryOS were out so I could not wait to install it on my latest laptop Acer Predator. 🀘 But... as usual, it was not without troubles...

Install ElementaryOS Juno on SecureBoot + EFI enabled computer

Yet another night passed to fight with the machine. πŸ’ͺ

I was really happy to know that the latest version of ElementaryOS were out so I could not wait to install it on my latest laptop Acer Predator. 🀘 But... as usual, it was not without troubles...

Compatible with SecureBoot + EFI enabled computers? Awesome!!

But not really in fact... It might work for some brands but for my Acer Predator... not at all. Well it can work but will requires the steps explained below.

@Jiab77
Jiab77 / raspberry-pi-2-3-and-4-wireless-bridge-ubuntu-server-18.04-arm+netplan.md
Last active April 18, 2025 09:37
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.

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 / enable-2.1-audio-output-in-pulseaudio.md
Last active June 27, 2024 21:08
So I decided to make some research and found a solution that works everytimes (on Ubuntu based distribs).

Enable 2.1 audio output in PulseAudio

I'm using a 2.1 speakers kit from Logitec but most of the time it is always detected as 2.0... πŸ˜’

So I decided to make some research and found a solution that works everytimes (on Ubuntu based distribs).

It seems to work also on Arch Linux, see comment from @ilikenwf.

Before patching

As you can see, my audio output is not patched.

@Jiab77
Jiab77 / libreoffice-6.x-plus-dark-theme-elementaryos.md
Last active June 27, 2024 21:08
Just a quick gist to keep track of what was needed to have the latest libreoffice version with Dark Theme and the ElementaryOS Icon pack to be accorded with the ElementaryOS distribution.

LibreOffice 6.x with Dark Theme and Icons for ElementaryOS

Just a quick gist to keep track of what was needed to have the latest libreoffice version with Dark Theme and the ElementaryOS Icon pack to be accorded with the ElementaryOS distribution.

Get the software

If you never used ppa before, you will need to install this package first software-properties-common.

sudo apt install software-properties-common