Skip to content

Instantly share code, notes, and snippets.

View frdmn's full-sized avatar
🦀

Jonas Friedmann frdmn

🦀
View GitHub Profile
@frdmn
frdmn / manual_bed_tramming_gcode.md
Created April 3, 2023 06:53
Gcode commands for manual bed leveling / tramming

Gcode commands for manual bed leveling / tramming (Ender 3)

The commands below assume a build plate of 235 x 235 mm.

Preparation

Disable endstops (Z-Limit)

M211 S0 
@frdmn
frdmn / index.md
Created March 8, 2023 14:13
Disable power save mode for wireless interfaces on Raspbian 10/Buster
vi /usr/lib/systemd/system/wifi_disable_powersave.service
[Unit]
Description=Disable WiFi power save mode
After=sys-subsystem-net-devices-wlan0.device

[Service]
@frdmn
frdmn / reminder_to_close_window.yaml
Created November 21, 2021 16:20
Improved version of @home-IoT/hass-blueprints:reminder_to_close_window.yaml
#
# Home Assistant Automation Blueprint
#
# Sends two notifications to close a window or door after opening it,
# if the temperature outside is below a certain degree.
#
# Revision 3
# Roozbeh Farahbod, Jan. 2021
# Jonas Friedmann, Nov. 2021
#
@frdmn
frdmn / mysqldump-progress-single-db.sh
Last active October 27, 2021 11:32 — forked from o5/dump.sh
MySQL / MariaDB Dump Helper
#!/usr/bin/env bash
# MySQL / MariaDB Dump Helper
# ===========================
# FEATURES: Progress bar with ETA, support multiple databases (dump into separated files) and password as argument
# REQUIREMENTS:
# =============
# GNU Core Utilities, mysql, mysqldump, pv (https://github.com/icetee/pv)
@frdmn
frdmn / index.md
Last active March 16, 2023 15:43
Raspberry Pi 4B with Prusa MK3s / Einsy RAMBo headers

Raspberry Pi 4B with Prusa MK3s / Einsy RAMBo headers

The guide below describes how to connect a Raspberry Pi 4B to the Prusa i3 MK3s main board (Einsy RAMBo) board with its builtin RPi headers and an additional step-down / buck converter. The buck converter is necessary, since the Einsy headers do not provide enough amps to power anything bigger than a Raspberry Pi Zero W.

Parts needed

Wiring

@frdmn
frdmn / keys.pub
Created August 18, 2020 12:53
frdmn@github - keys.pub
BEGIN MESSAGE.
EEGErlKyZxOo4VB kevDbZUEJAKrBDB R20P7l03WuMQcBL YELNpEd6pHSK0Ng
rELQG5zby40L7QO FwKs4uB8e83TCKq 6Xr2MZHgg6oYWic lco69PQeA8YqJel
dc4vyMPo8DNbKMT IfoxAFXppc4Frfl 8OE60qwf1IcLNGn gAHSdzQRYfjwayL
bgm5HNUb0f7EJJV DvyzY9wmIdIvIMx mGPQj.
END MESSAGE.
The MIT License (MIT)
Copyright (c) 2019 Jonas Friedmann
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@frdmn
frdmn / README.md
Last active January 5, 2023 10:51
Victor's macOS Client information parser
  1. Download the client-information and move it to /usr/local/bin/client-information:

    wget https://gist.githubusercontent.com/frdmn/5eeebc05c61c7a00450aee8b81be824c/raw/520d3e9ae9ec80710344119e1780939fa843130b/client-information -O /usr/local/bin/client-information
    bash +x /usr/local/bin/client-information
    
  2. Configure the scheduler to periodically run the script:

@frdmn
frdmn / cleanup.sh
Created August 22, 2018 09:23
Clear Rocket.Chat uploads periodically (before #11236 [message pruning] existed)
#!/usr/bin/env bash
# Script to remove old uploads in Rocket.Chat instances for people using the filesystem storage method.
# This script makes sure to NOT remove users avatars. Because they are stored in the same directory we
# have to query the Mongo to check if a file is a regular file upload or a avatar.
#
# Env vars:
# - DELETE_OLDER_THAN_DAYS (defaults to 5)
#
# Written by: Jonas "frdmn" Friedmann <j@frd.mn>
# Requirements: mongo (cli), docker-compose, jq, tofrodos package
@frdmn
frdmn / readme.md
Created April 19, 2018 08:33
Install imapsync from source on Ubuntu 16.04
  1. Install requirements and dependencies:

    apt install git cpanminus automake build-essential libauthen-ntlm-perl libclass-load-perl libcrypt-openssl-rsa-perl libdata-uniqid-perl libdate-manip-perl libdigest-hmac-perl libdigest-md5-file-perl libdist-checkconflicts-perl libfile-copy-recursive-perl libio-tee-perl libjson-perl libmail-imapclient-perl libmodule-implementation-perl libmodule-runtime-perl libmodule-scandeps-perl libpackage-stash-perl libpackage-stash-xs-perl libpar-packer-perl libreadonly-perl libsys-meminfo-perl libterm-readkey-perl libtest-fatal-perl libtest-mock-guard-perl libtest-mockobject-perl libtest-pod-perl libtest-requires-perl libtry-tiny-perl libunicode-string-perl make makepasswd perl-doc rcs
  2. Clone source code from git repository

    git clone https://github.com/imapsync/imapsync.git