Skip to content

Instantly share code, notes, and snippets.

View maxux's full-sized avatar
🔑

Maxime Daniel maxux

🔑
View GitHub Profile
Dave Kane - Zero-Plus (Dj Wout Remix)
Driftwood - Anything Goes (Majari Remix) / Vinyle
D72 - Finding Yourself (Extended Mix)
Three 'N One, Heerhorst - Reflect (Extended Mix)
DJ Ton T.B. - Electronic Malfunction (DJ Cor Fijneman's Outstanding Remix)
D-Devils - Judgement Day (Instrumental Mix) / Vinyle
Ralph Fridge - Man on Mars (Sven-R-G & Bass-T Remix)
Thomas Schumacher - Final Fantasy
Krl Mx - All I Ever Wanted Was Everything (Original Mix)
Roman Gehrecke - Geteiltes Leid
@maxux
maxux / 99-maxux.sh
Created December 27, 2024 18:20
bashrc.d
alias cp="cp -v"
alias mv="mv -v"
alias ssh="ssh"
alias nc="nc -v"
alias rm="rm -vi"
alias bc="bc -ql"
alias gdb="gdb -q"
alias cal="cal -m"
alias nogit='__git_ps1() { true; }'
alias cal="cal -3m"
@maxux
maxux / README.md
Last active December 3, 2024 23:59
Gentoo PXE Diskless Node (with Dracut initramfs 2024)

Since Gentoo Live now uses dracut as initramfs handler, legacy documentation about diskless PXE is irrelevant.

The live boot is supported directly by dracut from root= command line argument, but if we just pass the image.squashfs, the image won't be mounted correctly.

https://github.com/dracutdevs/dracut/blob/master/modules.d/90dmsquash-live/parse-dmsquash-live.sh#L40-L42

The special case where the squashfs image can be passed directly requires the image name to end with .img

With the latest iPXE trick, which allows specifying the filename inside the initramfs at load time, it allows to easily

@maxux
maxux / PKGBUILD
Last active December 12, 2023 20:00
Arch tfchain build script
pkgname="tfchain"
pkgver="2.6.0"
pkgrel="1"
pkgdesc="Threefold TFChain"
arch=("x86_64")
source=("https://example.com/${pkgname}-${pkgver}.tar.gz")
source=("https://github.com/threefoldtech/tfchain/archive/refs/tags/v${pkgver}.tar.gz")
license=("custom")
sha256sums=("a9059ae45895fff39d3eeeeaad2eda1298103d9f66232fca826d86f940cea010")
makedepends=("base-devel" "protobuf" "clang" "llvm" "gcc12" "rustup")
@maxux
maxux / gentoo-base-chroot.sh
Last active December 19, 2024 12:05
Gentoo Base Install Scripts
#!/bin/bash
gentoo="/home/gentoo"
mirror="https://ftp.belnet.be/pub/rsync.gentoo.org/gentoo/releases/amd64/autobuilds"
latest=$(curl -s ${mirror}/latest-stage3-amd64-openrc.txt | grep openrc | awk '{ print $1 }')
baselat=$(basename $latest)
mkdir -p ${gentoo}
cd ${gentoo}
@maxux
maxux / sqlite3-mysql-gateway.py
Last active October 24, 2023 00:02
SQLite3 MySQL Gateway
import sqlite3
db = sqlite3.connect("power-buffer.sqlite3")
cursor = db.cursor()
buffer = []
print("[+] fetching rows")
cursor.execute("SELECT * FROM power")
@maxux
maxux / hddtemp-smartctl.py
Last active July 9, 2023 20:49
HDD Temperature over smartctl when hddtemp doesn't works
import subprocess
import sys
import json
drives = [
"/dev/sda",
"/dev/sdb",
"/dev/sdc",
"/dev/sdd",
"/dev/sde",
module main
import os
import libsodium
import freeflowuniverse.crystallib.mnemonic
fn seed_from_random() []u8 {
mut seed := []u8{}
for _ in 0 .. 32 {
seed << u8(libsodium.randombytes_random())
{ stdenv, fetchFromGitHub, lib }:
stdenv.mkDerivation rec {
pname = "zdb";
version = "development-v2";
src = fetchFromGitHub {
owner = "threefoldtech";
repo = "0-db";
rev = version;

I put some work on a way to rethink how the current capacity computing and reward system works. ThreeFold main goal and philosophy is fair an equity to make a better world for everybody.

The current way on how we compute, reward and show grid capacity only rely on 'numbers' (amount of cores, amount of GBs of storage, ...). This way of thinking and computing was pretty good in a first step, to get the grid alive. It's now time to make it more robust and more fair.

We need to keep in mind couple things:

  • It's important to reuse old hardware and not throw it away if it still works
  • In this always evolving world, some application needs high power machine, we need some good hardware too