Disclaimer: These commands with wrong parameters could damage your system. Take care!
Before you use any commands on this page you MUST find out the bus number for the led control on your system
Run
i2cdetect -y 0
i2cdetect -y 1
| # Make sure CPU is in performance mode (see notes in Gist comments). | |
| echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | |
| # Install c2clat and gnuplot-nox | |
| sudo apt install -y gnuplot-nox | |
| git clone https://github.com/rigtorp/c2clat | |
| cd c2clat | |
| g++ -O3 -DNDEBUG c2clat.cpp -o c2clat -pthread | |
| # Set up the PNG dimension (set to 4096,2160 for 96+ CPU cores) |
Disclaimer: These commands with wrong parameters could damage your system. Take care!
Before you use any commands on this page you MUST find out the bus number for the led control on your system
Run
i2cdetect -y 0
i2cdetect -y 1
| #!/usr/bin/env python3 | |
| import math | |
| import psutil | |
| def get_system_info(): | |
| # Get the number of physical cores | |
| num_cores = psutil.cpu_count(logical=False) | |
| # Get available physical memory (in bytes) |
| #include <stddef.h> | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| //#include <stdlib.h> | |
| void* memcpy(void* dst, const void* src, size_t n){ | |
| volatile char* vc_src = (char*)src; | |
| volatile char* vc_dst = (char*)dst; | |
| // copy byte by byte, hopefully avoiding any alignment issues | |
| size_t pos = 0; |
After factory resetting the maching you will need to do the following things to bootstrap it with Ansible.
chsh -s /bin/bash (optional)xcode-select --installexport PATH="$HOME/Library/Python/3.8/bin:$PATH"| #!/bin/bash | |
| # Photogrammety automation script. | |
| # | |
| # Based on https://peterfalkingham.com/2018/04/01/colmap-openmvs-scripts-updated/ | |
| # Adapted from https://www.instructables.com/Free-Photogrammetry-on-Mac-OS-From-Photos-to-3D-Mo/ | |
| # | |
| # See full guide on Jeff Geerling's blog: | |
| # TODO | |
| # | |
| # Usage: |
References:
Ansible 101
Ansible for DevOps Examples
Book:
Ansible for DevOps by Jeff Geerling
Ressources:
Jeff Geerling's Ansible Content
Blog | Jeff Geerling
| CC = gcc | |
| RM = rm -f | |
| INSTRUMENT_FOR_PROMETHEUS := false | |
| ifeq ($(INSTRUMENT_FOR_PROMETHEUS),true) | |
| CFLAGS = -Wall -DINSTRUMENT_FOR_PROMETHEUS | |
| LIBS = -lbcm2835 -lprom -lpromhttp -lmicrohttpd | |
| else | |
| CFLAGS = -Wall |
| /* | |
| Deprecated, see https://gist.github.com/alwynallan/1c13096c4cd675f38405702e89e0c536 | |
| If you have to use software PWM, it's still here. | |
| */ | |
| #!/bin/bash | |
| # The default BAR address space available on the CM4 may be too small to allow | |
| # some devices to initialize correctly. To avoid 'failed to assign memory' | |
| # errors on boot, you can increase the range of the PCIe bus in the Raspberry | |
| # Pi's Device Tree (a .dtb file specific to each Pi model). | |
| # | |
| # You should probably read up on Device Trees if you don't know what they are: | |
| # https://www.raspberrypi.org/documentation/configuration/device-tree.md | |
| # |