Skip to content

Instantly share code, notes, and snippets.

View robertodr's full-sized avatar
🤡
Clowning around

Roberto Di Remigio Eikås robertodr

🤡
Clowning around
View GitHub Profile
@robertodr
robertodr / sgdisk.md
Created September 28, 2022 18:18
Formatting with `sgdisk`
DISK='/dev/disk/by-id/disk1'

sgdisk --zap-all ${DISK}

# syntax: --new=partnum:start:end
# syntax: --typecode=partnum:{hexcode|GUID}

# EFI system partition
sgdisk --new=1:1M:+1G --typecode=1:EF00 ${DISK}
@robertodr
robertodr / configuration.nix
Last active September 29, 2022 08:48
NixOS configuration for minimal fresh installation on the Framework
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[
"${builtins.fetchGit { url = "https://github.com/NixOS/nixos-hardware.git"; }}/framework/12th-gen-intel"
@robertodr
robertodr / constexpr.cpp
Created November 10, 2022 10:23
Some constexpr stuff
namespace detail {
constexpr auto factorial(size_t n) -> size_t {
return n <= 1 ? 1 : (n * factorial(n - 1));
}
constexpr auto binomial(size_t n, size_t k) -> size_t {
if (n == k || k == 0) {
return 1;
} else {
if (n == 0) {
@robertodr
robertodr / 00_pyproject.toml
Created February 22, 2023 17:22
Poetry cotengra install issue
[tool.poetry]
name = "floof"
version = "0.1.0"
description = ""
authors = ["Roberto <[email protected]>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.10"
cotengra = { git = "https://github.com/jcmgray/cotengra", rev = "1a746c6483f6fdabfcf83abd5a436d0ac42921eb" }
[tool.poetry]
name = "floof"
version = "0.3.0"
description = ""
authors = ["me"]
[tool.poetry.dependencies]
python = ">=3.10,<3.12"
scalene = "^1.5.20"
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{
config,
pkgs,
...
}: {
imports = [
# Include the results of the hardware scan.
@robertodr
robertodr / configuration.nix
Created December 12, 2023 22:27
btrfs-x1carbon
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@robertodr
robertodr / configuration.nix
Last active December 13, 2023 20:47
carpal-tunnel
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{
config,
lib,
pkgs,
...
}: {
imports = [