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 / using-raspberry-pi-3-and-4-to-fight-against-covid-19-with-rosetta-at-home.md
Last active April 27, 2020 02:51
Using Raspberry Pi 3B/3B+/4B to fight against COVID-19 with Rosetta@Home

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 / .ilg-config
Last active September 8, 2020 03:05
Intel Linux Graphics Package List - Install instructions
# [Distribution codename]
# key inst uninst
# # noop noop
# n noop noop
# s add-repo del-repo
# i install remove
# I install noop
# u install downgrade
# e error noop
# k kernel minver maxver INSTRUCTION (maxver is exclusive, minver inclusive)
@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 / emby-server-with-va-api.md
Last active May 20, 2021 17:03
Emby Server with VA-API

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 / 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-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:

@Jiab77
Jiab77 / virt-manager.md
Last active August 12, 2021 23:04
Virt-Manager Installation (for ubuntu based distrib)

Virt-Manager Installation (for ubuntu based distrib)

This gist will give you all installation steps needed to install properly virt-manager with all dependencies.

Dependencies

Here is the list of all dependencies required to install properly virt-manager on your ubuntu based distrib.

  • libvirt-bin
  • qemu
@Jiab77
Jiab77 / live-setup-x64.sh
Last active August 12, 2021 23:04
Quick live setup - Lazy live environment setup
#!/bin/bash
# Remove 'pantheon-mail' (not compatible to Gmail)
# Now keeping 'epiphany-browser'.
#sudo apt remove --purge -y epiphany-browser* pantheon-mail 2>/dev/null
sudo apt remove --purge -y pantheon-mail 2>/dev/null
# Clean up the system
sudo apt autoremove --purge -y
@Jiab77
Jiab77 / git-init.md
Last active August 12, 2021 23:04
Lazy git intialisation script

Lazy git intialisation script

Just run these commands by copy/paste or saving in a script.

#!/bin/bash

# Git initialisation script
# Just because I'm a lazy guy that dont want to do it 
# manually on every installs...
@Jiab77
Jiab77 / how-to-control-boinc-workload-based-on-the-host-temperature.md
Last active October 3, 2021 11:50
How to control BOINC workload based 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.