Skip to content

Instantly share code, notes, and snippets.

View pyrho's full-sized avatar
🕶️
8)

Damien Rajon pyrho

🕶️
8)
View GitHub Profile
@pyrho
pyrho / wm8960.c
Created October 10, 2024 22:26
WM8960 codec init function for STM32
/*
* wm8960.c
*
* Date: 2024-09-03
* Author: @pyrho
*/
#include "wm8960.h"
#include "stm32h7xx_hal_def.h"
#include "stm32h7xx_hal_i2c.h"
#include <Wire.h>
#include "AHT20.h"
#include <ESP8266WiFi.h>
#include <InfluxDbClient.h>
#include <InfluxDbCloud.h>
#define ONE_MINUTE 60 * 1000
#define ONE_HOUR ONE_MINUTE * 60
#define INFLUXDB_URL "http://influxdb2.lan:8086"
@pyrho
pyrho / timelapse.gcode
Last active October 11, 2023 13:14
GCode for timelapse trigger - Prusa MK4
;AFTER LAYER CHANGE
;[layer_z]
{ if layer_num >= 1 }
; Retraction is not needed
;G1 E-2 F3600 ; retract
G0 X0 Y170 F{travel_speed*60} ; get next to the switch
M400 ;Wait for all moves to finish
@pyrho
pyrho / bottle_holder.diff
Created July 23, 2023 15:18
bottle_holder.diff
10a11
> boltZOffset=-15;
132c133,134
< for(z=[0.5,-0.5]) t([0,0,z*boltSpan]){
---
> t([0, 0, boltZOffset])
> for(z=[0.5,-0.5]) t([0,0,(z*boltSpan)]){
$fn= $preview ? 16:32;
// bottle
bottleD=73-10;
bottleHullTol=0.2; // render tolerance
// bike frame
frameD=35+.5;
framePadD=11+.5; // diameter of pads around frame holes
framePadH=0; // 0 for flat back
black = '#1d292f';
red = '#f7768e'; // red
green = '#9ece6a'; // green
yellow = '#e0af68'; // yellow
blue = '#7aa2f7'; // blue
magenta = '#bb9af7'; // pink
cyan = '#7dcfff'; // cyan
white = '#a9b1d6'; // light gray
lightBlack = '#414868'; // medium gray
lightRed = '#f7768e'; // red
@font-face {
font-family: "RobotoMono Nerd Font";
font-style: normal;
font-weight: 200;
src: url(https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/RobotoMono/Light/complete/Roboto%20Mono%20Light%20Nerd%20Font%20Complete.ttf?raw=true);
}
@font-face {
font-family: "RobotoMono Nerd Font";
font-style: normal;
font-weight: 400;
@pyrho
pyrho / victor-mono.css
Last active January 2, 2023 19:41
A font file for Blink Shell with the Victor Mono font
@font-face {
font-family: "VictorMono Nerd Font";
font-style: normal;
font-weight: 200;
src: url(https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/VictorMono/Light/complete/Victor%20Mono%20Light%20Nerd%20Font%20Complete%20Mono.ttf?raw=true);
}
@font-face {
font-family: "VictorMono Nerd Font";
font-style: normal;
font-weight: 400;
@pyrho
pyrho / gist:296e957645a2e5472c6368d6e9fb5fb0
Created January 25, 2021 18:23
VSCode launch.json for Typescript AVA unit tests
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Run AVA test",
"program": "${workspaceRoot}/node_modules/.bin/ava",
"args": [
"${file}",
# vim:fileencoding=utf-8:ft=conf
# You can include secondary config files via the "include" directive.
# If you use a relative path for include, it is resolved with respect to the
# location of the current config file. Note that environment variables
# are expanded, so ${USER}.conf becomes name.conf if USER=name
# For example:
# include other.conf
# Fonts {{{