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 / 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 / how-to-fix-GRUB-boot-error-after-BootHole-patch.md
Created August 5, 2020 09:57
How to fix GRUB boot error after BootHole patch

Repair GRUB after BootHole broken patch

Once rebooted after patching, you will kindly greated by error: symbol 'grub_calloc' not found, entering rescue mode and way to boot the OS anymore...

The thing become even more horrible if you are using an encrypted partition plus LVM...

You can skip the steps 2 and 4 if you just have a normal partition scheme with no encryption or LVM.

Recovery steps

@Jiab77
Jiab77 / upgrade-systemd-on-ubuntu-18.04.md
Last active December 11, 2023 20:18
Upgrade systemd on Ubuntu 18.04

Upgrade systemd on Ubuntu 18.04

In this document, I will explain how to upgrade the default systemd version from 237 to 242.

The main reason why I needed this was related to the DNS-over-TLS that was not supported in the version 237 but available from version 242.

Later, when playing with Lynis, the security auditing tool, I then discovered that the version 242 was also providing the command systemd-analyze that is used by lynis to detect if existing systemd services are configured correctly in the security context, meaning that the existing services can run as expected but needs few or several changes in their configuration to make them safe without any exploitable attack surfaces.

You can try it once you've installed the version 242 of systemd that way:

@Jiab77
Jiab77 / setup-DNS-over-TLS-with-systemd-on-ubuntu-18.04.md
Last active September 18, 2022 20:48
Setup DNS-over-TLS with systemd on Ubuntu 18.04

Setup DNS-over-TLS with systemd on Ubuntu 18.04

This gist will explain how to setup DNS-over-TLS on your local computer.

Verify systemd version

To make it work, you need at least systemd version 237 or 242.

I'll use the version 242 in this gist.

@Jiab77
Jiab77 / create-DNS-over-TLS-bridge-with-unbound-stubby-and-systemd-on-ubuntu-server-18.04.md
Last active May 27, 2024 09:31
Create DNS-over-TLS bridge with unbound, stubby and systemd on Ubuntu Server 18.04
@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 / get_cuda_sm.sh
Created February 22, 2021 21:42 — forked from eyalroz/get_cuda_sm.sh
Shell script for determining the SM value for your (single) GPU
#!/bin/bash
#
# Prints the compute capability of the first CUDA device installed
# on the system, or alternatively the device whose index is the
# first command-line argument
device_index=${1:-0}
timestamp=$(date +%s.%N)
gcc_binary=${CMAKE_CXX_COMPILER:-$(which c++)}
cuda_root=${CUDA_DIR:-/usr/local/cuda}
@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 / simple-multi-threaded-php-web-server.md
Last active September 10, 2023 14:26
An easy way to start the embedded PHP web server with the multi-thread option enabled or simulated when necessary.
@Jiab77
Jiab77 / upgrade-nut-on-ubuntu-18.04.md
Last active July 1, 2021 03:51
Upgrade nut on Ubuntu 18.04

Upgrade nut on Ubuntu 18.04

In this document, I will explain how to upgrade the default nut (Network UPS Tools) version from 2.7.4-5.1ubuntu2 to 2.7.4-11ubuntu4.

It is basically the same process as the one used in my previous upgrade gist, Upgrade systemd on Ubuntu 18.04.

The main reason why you would follow this gist is because by default the UPS detection tool nut-scanner is not available by default on Ubuntu 18.04 and can't be compiled correctly from source due to non standard library linking used that does not find the shared library even if it is correctly installed / loaded on the system.

Maybe you have been more lucky than me on your side and then you can simply leave this gist 😅 but on my side every fix attempts resulted in: