Skip to content

Instantly share code, notes, and snippets.

View leozqi's full-sized avatar

Leo Qi leozqi

View GitHub Profile
@leozqi
leozqi / OVH RAID Configuration.md
Created September 21, 2025 21:55
How to setup OVH FreeBSD with RAID.
#include <stdio.h>
#include "system.h"
#include "altera_avalon_pio_regs.h"
#include "sys/alt_irq.h"
#define EGM_DISABLE 0
#define EGM_ENABLE 1
#define EGM_ENABLE_REG 0
#define EGM_BUSY_REG 1
#define EGM_PERIOD_REG 2
@leozqi
leozqi / UTCI_a002.f90
Created January 16, 2024 19:42
Copy of Peter Broede's UTCI Temperature calculator
!~ UTCI, Version a 0.002, October 2009
!~ Copyright (C) 2009 Peter Broede
!~ Program for calculating UTCI Temperature (UTCI)
!~ released for public use after termination of COST Action 730
!~ replaces Version a 0.001, from September 2009
!~ Version History:
@leozqi
leozqi / utci.c
Created November 1, 2022 21:24
ECE198 UTCI calculation function
#include <stdio.h>
double calc_utci(double temp_air, double temp_rad, double humidity,
double wind_spd)
{
double t_a = temp_air;
double d_t_r = temp_rad - temp_air;
double pa = humidity/10.0; /* humidity is in ehPa */
double v = wind_spd;