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 / 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 / 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 / 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 / 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 / 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 / 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.md
Last active June 27, 2024 21:05
This file will contain instructions to run goaccess from a PHP instance.

Using GoAccess with PHP

This file will contain instructions to run goaccess from a PHP instance.

For more details on GoAccess check these links:

Installation

For this project, I'm using a compiled version of GoAccess with enabled options to reduce the memory usage.

@Jiab77
Jiab77 / emby-server-with-va-api.md
Last active June 27, 2024 21:05
Just a quick gist to keep track of my research on this topic.

Emby Server with VA-API

Just a quick gist to keep track of my research on this topic.

Environment

I'm using Ubuntu Server 18.04.2 as operating system.

Download

Go to the download page and select your version: https://emby.media/linux-server.html

For my research, I've used two versions:

@Jiab77
Jiab77 / using-raspberry-pi-3-and-4-to-fight-against-covid-19-with-rosetta-at-home.md
Last active June 27, 2024 21:05
The goal of this gist is to explain how I have build a Beowulf cluster based on Raspberry Pi models 3B / 3B+ and 4B.

Using Raspberry Pi 3B/3B+/4B to fight against COVID-19 with Rosetta@Home

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.

The cluster will be initially used to compute workunits from the Rosetta@Home project.

In this gist I will stay with Raspberry Pi nodes.

@Jiab77
Jiab77 / how-to-control-boinc-workload-based-on-the-host-temperature.md
Last active October 27, 2024 05:43
I will explain here how to start and stop boinc depending on the host temperature.

How to control BOINC workload based on the host temperature

I will explain here how to start and stop boinc depending on the host temperature.

Context

I'm actually using a NUC to run BOINC and the Rosetta@Home project but this host is getting hot very quick and sometimes it will shutdown because of overheating.

To avoid this, I've requested the help of @AenBleidd, one of the BOINC developers. He gave me idea to use lm-sensors and CRON to run a script that will start / stop BOINC.