Skip to content

Instantly share code, notes, and snippets.

View sammcj's full-sized avatar
🦃

Sam sammcj

🦃
View GitHub Profile
@laundmo
laundmo / compose-check.py
Last active December 23, 2022 07:45
Check which docker-compose services were changed since last "up" and which containers need to be restarted
#!/usr/bin/env python3
# This code is available under the MIT license: https://opensource.org/licenses/MIT
from pathlib import Path
import subprocess
import json
from dataclasses import dataclass
from typing import List, Optional
@tuxuser
tuxuser / adalight_neopixel.ino
Last active August 25, 2023 02:20
Adalight Neopixel implementation (SK6812 RGBW works)
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif
/**************************************
S E T U P
set following values to your needs
**************************************/

Moved to repo: /quenhus/uBlock-Origin-dev-filter

In order to keep filters up to date, please use this repo.

@garethr
garethr / LICENSE
Last active January 21, 2022 21:33
A script for customers to use the Snyk API to get a list of projects impacted by the Log4Shell vulnerability
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
[gcode_macro START_PRINT]
gcode:
#Get Printer built volume dimensions
{% set X_MAX = printer.toolhead.axis_maximum.x|default(100)|float %}
{% set Y_MAX = printer.toolhead.axis_maximum.y|default(100)|float %}
{% set Z_MAX = printer.toolhead.axis_maximum.z|default(100)|float %}
#Get Nozzle diameter and filament width for conditioning
{% set NOZZLE = printer.extruder.nozzle_diameter|default(0.4)|float %}
{% set FILADIA = printer.extruder.filament_diameter|default(1.75)|float %}
@ChipCE
ChipCE / readme.md
Last active May 2, 2024 08:38
Klipper bed mesh on print area only macro install guide

READ THIS FIRST

Adaptive bed mesh is merged into klipper master branch. You can use this feature without this custom macro. Official klipper adaptive bed mesh

Klipper mesh on print area only install guide

What this macro do

  • This macro will dynamically changing the bed mesh area based on the size of the parts will be printed. The fw will only probe on the area that the part will be printed (plus mesh_area_offset value)
@GermanAizek
GermanAizek / README.MD
Last active January 13, 2024 15:15
Crucial MX500 Linux Upgrade Firmware

My home server runs on two Crucial MX500 drives. I’d selected those drives because of the price/performance/reliability.

However, upgrading the firmware turned out to be nearly impossible. If you’re looking for an SSD for a Linux server, one thing I’d add to this selection matrix is to find a manufacturer that supports decent online firmware updates.

A small rant: Crucial’s upgrade process is notoriously difficult on Linux. The Windows firmware update can be done from Windows itself, but the provided Linux update only works via a bootable ISO that also requires legacy BIOS (and therefore no AHCI). Converting this to USB works poorly, on many attempts the kernel can’t find its own system disk, or can’t find the SSD hardware. The Internet is full with tutorials on this problem, and you’ll even find advise to [customize the bootloader] (http://pyropus.ca/personal/writings/crucial-m550-firmware-update.html). Given that a typical server takes 2 minutes to boot, the debugging cycle is slow; I spend a good 2 days

@prcutler
prcutler / printer.cfg
Last active May 11, 2023 11:53
Ender 3 v2 Klipper printer.cfg
# This file contains pin mappings for the stock 2020 Creality Ender 3
# V2. To use this config, during "make menuconfig" select the
# STM32F103 with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
# communication.
# If you prefer a direct serial connection, in "make menuconfig"
# select "Enable extra low-level configuration options" and select
# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
# cable used for the LCD module as follows:
# 3: Tx, 4: Rx, 9: GND, 10: VCC
@kepano
kepano / obsidian-web-clipper.js
Last active May 3, 2024 07:21
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@sekcompsci
sekcompsci / Comparison Espressif ESP MCUs.md
Created June 18, 2021 03:56 — forked from fabianoriccardi/Comparison Espressif ESP MCUs.md
Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December