Skip to content

Instantly share code, notes, and snippets.

@e-roux
e-roux / Memo: webhooks.md
Created October 6, 2019 12:50
Memo: webhooks
@e-roux
e-roux / Memo: Kubernetes - K8S.md
Last active October 6, 2019 17:11
Memo: Kubernetes - K8S
@e-roux
e-roux / Memo: Ubuntu.md
Last active January 17, 2021 18:19
Memo: Ubuntu

Ubuntu

Alternatives: update-alternatives

Add an alternative group:

$ sudo update-alternatives --install <link> <name> <path> <priority>
@e-roux
e-roux / marshmallow_xml.py
Created February 3, 2020 21:19
Sample pre_load and xml in marshmallow
from xml.etree.ElementTree import Element
import xml.etree.ElementTree as ET
from marshmallow import (Schema, pre_load)
from marshmallow.fields import (
Str,
Integer,
List,
Nested
@e-roux
e-roux / pydantic.py
Created February 5, 2020 07:02
Pydantic
from xml.etree.ElementTree import Element
import xml.etree.ElementTree as ET
from collections.abc import Iterator
from pydantic import BaseModel
from typing import Optional
def get_children(fragment, eltname):
return filter(lambda elt: elt.tag != eltname, fragment.find(eltname))
@e-roux
e-roux / vmware.md
Last active November 30, 2020 22:19

VMware

Troubleshooting on hosts with secure mode enabled

UEFI[^1] Secure Boot[^2] (SB) is a verification mechanism for ensuring that code launched by a computer's UEFI firmware is trusted. Unsigned drivers are therefor not allowed to load.

2 kernels modules are compiled at installation time and must be loaded. If the host provides the proper kernel headers and gcc, these two modules will be built silently. The progress is logged into /tmp/vmware-root/vmware-PID.log [^3].

On error type like:

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.