Skip to content

Instantly share code, notes, and snippets.

@a-h
a-h / README.md
Created September 11, 2022 15:49 — forked from wpiekutowski/README.md
Apple Virtualization NixOS ISO

Run NixOS ISO using Apple Virtualization framework (for example UTM or vftool)

  • download or build ISO: nix-build -A iso_minimal_new_kernel.aarch64-linux '<nixpkgs/nixos/release.nix>'
  • copy ISO: scp "ip_addr:result/iso/*" .
  • mount: hdiutil *.iso
  • copy kernel and initrd: cp /Volumes/nixos-minimal-21/boot/Image /Volumes/nixos-minimal-21/boot/initrd .
  • find and copy kernel params: less /Volumes/nixos-minimal-21/EFI/boot/grub.cfg
  • append console=hvc0 to params
@a-h
a-h / dft.go
Created August 6, 2024 09:13 — forked from r9y9/dft.go
Discrete Fourier Transform in Go
package main
import "math"
import "fmt"
func DFT_naive (input []float64) ([]float64, []float64) {
real := make([]float64, len(input))
imag := make([]float64, len(input))
arg := -2.0*math.Pi/float64(len(input))
for k := 0; k < len(input); k++ {