Skip to content

Instantly share code, notes, and snippets.

View maruel's full-sized avatar
🐢
Deleting PiB of data.

M-A maruel

🐢
Deleting PiB of data.
View GitHub Profile
@maruel
maruel / gist:4e82f06eadabccf1283502135725405f
Created October 27, 2024 14:57
parametric-bearing-pillow-block
// https://zoo.dev/docs/kcl-samples/a-parametric-bearing-pillow-block
// rewritten as a function.
// MARUEL: Currently not working as I don't know how to boolean merge two extrudes.
// A Parametric Bearing Pillow Block
// A bearing pillow block, also known as a plummer block or pillow block bearing, is a pedestal used to provide support for a rotating shaft with the help of compatible bearings and various accessories. Housing a bearing, the pillow block provides a secure and stable foundation that allows the shaft to rotate smoothly within its machinery setup. These components are essential in a wide range of mechanical systems and machinery, playing a key role in reducing friction and supporting radial and axial loads.
fn bearingPillowBlock = (length, width, height, cbDepth, cbDia, holeDia, padding, bearingDia) => {
// (Needs to be updated). Sketch the block and extrude up to where the counterbore diameter starts.
block = startSketchOn('XY')
@maruel
maruel / merge_tesla_sentry_videos.sh
Last active August 22, 2024 17:38
Merge all tesla sentry videos with timestamp overlay
#!/bin/bash
# Copyright 2024 Marc-Antoine Ruel
# Original at https://gist.github.com/maruel/ffbcd83f204561346bbe3cc51682e7af
#
# Merges mp4 from Tesla Sentry into 4 videos files: front.mp4, back.mp4,
# left_repeater.mp4, right_repeater.mp4. Overlay the timestamp on the video.
#
# Usage:
# - Install ffmpeg.
# - Copy all the files from your Tesla Sentry USB key in a directory.
- id: '123'
alias: 'Salle chauffage: Exhaust on'
description: ''
trigger:
- platform: numeric_state
entity_id:
- sensor.x1c_vitesse_du_ventilateur_de_refroidissement
above: 0
- platform: numeric_state
entity_id:
@maruel
maruel / README.md
Last active November 8, 2024 20:18
Steps to connect your spools' remaining filament in the AMS to a Google Sheet

AMS to GSheet

Prerequisites

  • Bambulab printer (A1 mini, A1, P1P, P1S, X1, X1C, X1E).
  • Home Assistant with experience how to use it.
  • Google account (i.e. Gmail)

Steps

https://man7.org/linux/man-pages/man1/dd.1.html
dd bs=4M if=/dev/nvme2n1 of=/dev/nvme1n1 conv=noerror status=progress
BAD 4M blocks:
565+1 (1.8GiB)
580+2 (2.2GiB)
1639+3 (6.3GiB)
241689+4 (944GiB)
@maruel
maruel / filter.sh
Created June 20, 2022 18:38
Filter periph.io old repository into new repositories.
#!/bin/bash
# This script requires https://github.com/newren/git-filter-repo/ to be in PATH.
PATH=$HOME/src-oth/git-filter-repo:$PATH
set -eux
function makepkg {
PKG=$1
shift
@maruel
maruel / install_cuda_libcudnn.sh
Last active November 6, 2021 14:46
Script to install CUDA and libcudnn on Ubuntu 20.04
#/bin/bash
# Copyright 2021 Marc-Antoine Ruel. No rights reserved.
# Official version at https://gist.github.com/maruel/e99622298891cc856044e8c158a83fdd
#
# Used the following as reference:
# - https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=20.04&target_type=deb_network
# - https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html
# - https://youtu.be/BXFGEGO8UY0
#
# I recommend looking at all 3 references before moving on.
@maruel
maruel / gist:9bdc6b9a2fc16321b608fecd5fdb1996
Created May 20, 2021 14:35
apg -m 3 -M l -n 1000 | sort
abgib
abvondel
acho
aco
acoqu
ada
agcid
agcoch
aikligpyu
aip
@maruel
maruel / gist:1dc9db50994f98b0f85280c6a7d88c9d
Created May 20, 2021 14:34
apg -m 5 -M l -n 1000 | sort
abawmein
abmeipi
abtalv
abwobwafs
abwub
aciktinyi
aciorleu
acirc
ackuiva
acshathjax
@maruel
maruel / checkout.sh
Last active December 22, 2020 16:45
Checking out chromium release branch from scratch on Ubuntu 20.04
#!/bin/bash
# Ref:
# https://chromium.googlesource.com/chromium/src/+/master/docs/#checking-out-and-building
#
# Note: the instructions say to use "fetch --nohooks chromium" but we'll do it
# manual here since we want to fetch the minimal amount of data and fetch a
# release branch instead of the tip of tree.
set -eux