My guide for setup of NixOS with LVM on multiple device LUKS on mdadm:
-
mdadm for RAID 1:
- for system and data physical volumes,
- you can use RAID5 or other levels, based on needs,
-
LUKS for device encryption:
job "pihole" { | |
datacenters = ["dc1"] | |
type = "service" | |
group "pihole" { | |
count = 1 | |
volume "volume_nomad" { | |
type = "host" | |
read_only = false |
const std = @import("std"); | |
const print = std.debug.print; | |
pub fn main() anyerror!void { | |
print("Guess the number!\n", .{}); | |
var secretNumber: i32 = std.rand.DefaultPrng | |
.init(@intCast(u64, std.time.timestamp())) | |
.random().intRangeAtMost(i32, 0, 100); | |
print("The secret number is {}\n", .{secretNumber}); |
// Another suggestion from watching | |
// https://www.youtube.com/watch?v=AHc4x1uXBQE&t=336s | |
// with my (genuine) 1 hour zig coding experience, I naively believe | |
// that this sould remove the memory issue within the union. | |
// and therefore is a slight improvement on the presented enum solution | |
const std = @import("std"); | |
const stdout = std.io.getStdOut().writer(); |
System information commands | |
=========================== | |
(*) #su Show only errors and warnings: `dmesg --level=err,warn` | |
(*) View dmesg output in human readable format: `dmesg -T` | |
(*) Get an audio notification if a new device is attached to your computer: `dmesg -tW -l notice | gawk '{ if ($4 == "Attached") { system("echo New device attached | espeak") } }` | |
(*) Dmesg: follow/wait for new kernel messages: `dmesg -w` | |
(*) The proper way to read kernel messages in realtime.: `dmesg -wx` | |
(*) Query graphics card: `lspci -nnk | grep -i VGA -A2` |
Caution,Name,Version,Size (raw),Size (minified),Size (gzipped),"Site","URL",Remarks | |
,Milligram,v1.4.1,11 kb,9.0 kb,2.3 kb,"https://milligram.io/","https://cdnjs.cloudflare.com/ajax/libs/milligram/1.4.1/milligram.min.css", | |
,Skelton,v2.0.4,11 kb,5.8 kb,1.6 kb,"http://getskeleton.com/","https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css", | |
,Material Design Lite,v1.3.0,146 kb,62 kb,12 kb,"https://getmdl.io/","https://code.getmdl.io/1.3.0/material.min.js", | |
,Foundation,v6.6.3,168 kb,133 kb,17 kb,"https://get.foundation/","https://cdn.jsdelivr.net/npm/foundation-sites@6.6.3/dist/css/foundation.min.css", | |
,Materialize,v1.0.0,179 kb,141 kb,21 kb,"https://materializecss.com/","https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css", | |
,Bootstrap,v4.6.0,199 kb,161 kb,24 kb,"https://getbootstrap.com/docs/4.6/","https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css", | |
,Bootstrap,v5.1.2,206 kb,164 kb,24 kb,"https://getbootstrap.com/","https://cdn.jsdelivr.net/npm/b |
Revision: 06.08.2023, https://compute.toys/view/398
fn sdCircle(p: vec2f, r: f32) -> f32 {
return length(p) - r;
}
const std = @import("std"); | |
const builtin = @import("builtin"); | |
const testing = std.testing; | |
const process = std.process; | |
const fs = std.fs; | |
const ChildProcess = std.ChildProcess; | |
var a: *std.mem.Allocator = undefined; | |
pub fn main() !void { |
package main | |
import ( | |
"gonum.org/v1/gonum/graph" | |
"gonum.org/v1/gonum/graph/simple" | |
"gonum.org/v1/gonum/graph/traverse" | |
) | |
var ( | |
wdg *LightWeightedGraph |
/* | |
* Build with: | |
* g++ aaraymarcher.cpp $(aalib-config --cflags) $(aalib-config --libs) -lm -o aaraymarcher | |
*/ | |
#include <math.h> | |
#include <unistd.h> | |
#include <time.h> | |
#include <stdlib.h> | |
#include <stdio.h> |