Skip to content

Instantly share code, notes, and snippets.

View badele's full-sized avatar

Bruno Adele badele

View GitHub Profile
@thehans
thehans / phillips.scad
Created February 26, 2021 18:41
OpenSCAD model for Phillips screwdriver
$fs=0.2;
$fa=0.2;
headNum = 2;
phillipsDrive(headNum);
//phillipsDemo(headNum);
module phillipsDemo(num) {
difference() {
@prologic
prologic / LearnGoIn5mins.md
Last active February 18, 2024 15:59
Learn Go in ~5mins
@sbyx
sbyx / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active March 25, 2024 21:06
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Low battery level detection & notification for all battery sensors
description: Regularly test all sensors with 'battery' device-class for crossing
a certain battery level threshold and if so execute an action.
domain: automation
input:
threshold:
name: Battery warning level threshold
description: Battery sensors below threshold are assumed to be low-battery (as
well as binary battery sensors with value 'on').
@caadar
caadar / autologin-tty-nixos.org
Last active October 23, 2023 00:34
How to make a user autologin at the console on NixOS

Autologin a user at the console (NixOS)

Problem

NixOS provide services.mingetty.autologinUser option, but it can’t be used for the specific TTY.

Minimal working example

TTY1 and user “guest”:

@zoilomora
zoilomora / README.md
Last active March 22, 2024 09:22
How to disable cloud-init in Ubuntu

How to disable cloud-init in Ubuntu

Prevent start

  • Create an empty file to prevent the service from starting

      sudo touch /etc/cloud/cloud-init.disabled
    

Uninstall

@Liblor
Liblor / volume.sh
Created May 21, 2019 20:30
Volume notification: Pulseaudio and dunst
#!/usr/bin/bash
# Volume notification: Pulseaudio and dunst
# inspired by gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a
icon_path=/usr/share/icons/Adwaita/64x64/status/
notify_id=506
sink_nr=1 # use `pacmd list-sinks` to find out sink_nr
@qoomon
qoomon / conventional_commit_messages.md
Last active March 28, 2024 19:18
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

ℹ️ git-conventional-commits A CLI util to ensure this conventions and generate changelogs

Commit Message Formats

Default

# Credit for this: Nicholas Swift
# as found at https://medium.com/@nicholas.w.swift/easy-a-star-pathfinding-7e6689c7f7b2
from warnings import warn
import heapq
class Node:
"""
A node class for A* Pathfinding
"""
@heroheman
heroheman / ranger-cheatsheet.md
Last active March 27, 2024 15:40
Ranger Cheatsheet

Ranger Cheatsheet

General

Shortcut Description
ranger Start Ranger
Q Quit Ranger
R Reload current directory
? Ranger Manpages / Shortcuts