Skip to content

Instantly share code, notes, and snippets.

View Alex9779's full-sized avatar

Alexander Leisentritt Alex9779

View GitHub Profile
@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)
@arnebjarne
arnebjarne / ipmi-updater.py
Last active November 12, 2023 06:14 — forked from HQJaTu/ipmi-updater.py
Supermicro IPMI certificate updater
#!/usr/bin/env python3
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=python
# This file is part of Supermicro IPMI certificate updater.
# Supermicro IPMI certificate updater is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
@artkrz
artkrz / hass_influx_drop_mesurments.sh
Last active February 21, 2024 16:32
Remove measurements from HASS InfluxDB
#!/bin/bash
host=localhost
db='home_assistant'
measurements=$1
measurements=($(influx --host $host --execute 'show measurements' --database=$db | grep "$1"))
if (( ${#measurements[@]} ))
then
@carlchan
carlchan / haproxy.cfg
Last active October 29, 2019 10:09
HAProxy - Client SSL Auth "knocking" and automatic certbot
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
@GenesisFR
GenesisFR / FindWindow.cs
Last active June 26, 2023 21:50
C# method returning handles matching a given process name and class name
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace FindWindow
{
class FindWindow
@sergey-dryabzhinsky
sergey-dryabzhinsky / sysctl-proxmox-tune.conf
Last active May 10, 2024 15:00
Most popular speedup sysctl options for Proxmox. Put in /etc/sysctl.d/
###
# Proxmox or other server kernel params cheap tune and secure.
# Try it if you have heavy load on server - network or memory / disk.
# No harm assumed but keep your eyes open.
#
# @updated: 2020-02-06 - more params used, adjust some params values, more comments on params
#
### NETWORK ###
@rvl
rvl / git-pushing-multiple.rst
Created February 9, 2016 11:41
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@groovenectar
groovenectar / roundedcube.scad
Last active April 6, 2024 04:40
roundedcube.scad - Fork me and make me better!
// More information: https://danielupshaw.com/openscad-rounded-corners/
// Set to 0.01 for higher definition curves (renders slower)
$fs = 0.15;
module roundedcube(size = [1, 1, 1], center = false, radius = 0.5, apply_to = "all") {
// If single value, convert to [x, y, z] vector
size = (size[0] == undef) ? [size, size, size] : size;
translate_min = radius;
@pulsar256
pulsar256 / my_hetzner_xen_setup.md
Last active February 9, 2023 22:20
Hetzner Xen + v4 Subnet + v6 Subnet Setup HowTo

Hetzner Primary IPv4 IP + IPv4/2x Subnet + "Non-Routed" IPv6/64 Subnet HowTo

... so I do not forget the next time I have to figure this stuff out. And perhaps to help other poor souls fiddling with v6/v4 xen setups in a Hetzner network environment.

Basic setup

You can basically follow along the Xen Project Beginners Guide.

The short version

Install Debian Wheezy via Hetzner's installimage on the rescue system, the only important part about partitioning is that you have an LVM volume group named vg0 with enough space for your guests' disks.

@fkleon
fkleon / temperature.sh
Created August 3, 2013 18:27
FreeBSD / FreeNAS script to send a status report containing CPU and HDD temps and status to a given email address. Tested on FreeNAS 9.1.0-RELEASE (based on FreeBSD 9-STABLE). Based on the script available at http://forums.freenas.org/threads/how-to-monitor-system-cpu-hdd-mobo-gpu-temperatures-on-freenas-8.2994/#post-38847.
#! /usr/local/bin/sh
# Write email header to temp file
(
echo "To: your@email"
echo "Subject: System Temperatures INFO"
echo " "
) > /var/cover
# Define adastat function, which writes drive activity to temp file