Skip to content

Instantly share code, notes, and snippets.

Avatar
😍
In love with Codespaces!

Patrick bumbummen99

😍
In love with Codespaces!
View GitHub Profile
@bumbummen99
bumbummen99 / GCodeScripts.md
Last active Nov 24, 2022
These are my G-Code script's that i am using in OctoPrint with my Ender 3 Pro running the Marlin firmware.
View GCodeScripts.md

G-Code Scripts

These are my G-Code script's that i am using in OctoPrint with my Ender 3 Pro running the Marlin firmware.

After pause

; check for paused state
{% if pause_position.x is not none %}
  ; relative XYZE
  G91
  M83
View grafana-agent-install.sh
#!/usr/bin/env bash
# Download Node Exporter
wget https://github.com/prometheus/node_exporter/releases/download/v1.1.1/node_exporter-1.1.1.linux-amd64.tar.gz
tar xvfz node_exporter-*.*-amd64.tar.gz
cd node_exporter-*.*-amd64
# Install node_exporter to /usr/local/bin as grafana-agent
cp node_exporter /usr/local/bin/grafana-agent
@bumbummen99
bumbummen99 / README.md
Created Apr 6, 2022
Laravel Sail + Octane + YASD
View README.md

Install YASD

  1. Add the following ARG to your Dockerfile
ARG YASD_VERSION=2c86a0c
  1. Add the build dependencies to the apt-get install section of your Dockerfile
apt-get install -y ... libboost-all-dev \
@bumbummen99
bumbummen99 / Readme.md
Created Oct 14, 2021 — forked from brgaulin/Readme.md
ESP32-S2 Keyboard on Arduino
View Readme.md
View RKSL-Filename-Bug.Dockerfile
# Use Ubuntu 20.04 LTS
FROM ubuntu:20.04
# Install common software
RUN apt update && apt install -y software-properties-common
# Add SteamCMD repository
RUN add-apt-repository multiverse \
&& dpkg --add-architecture i386
View mysql_secure.sh
#!/bin/bash
#
# Automate mysql secure installation for debian-baed systems
#
# - You can set a password for root accounts.
# - You can remove root accounts that are accessible from outside the local host.
# - You can remove anonymous-user accounts.
# - You can remove the test database (which by default can be accessed by all users, even anonymous users),
# and privileges that permit anyone to access databases with names that start with test_.
@bumbummen99
bumbummen99 / TerminalWelcomeMessage.sh
Last active Jan 30, 2020
Bash script to show a customizeable text as ASCII art (Figlet) in every new terminal.
View TerminalWelcomeMessage.sh
# First install figlet as this is required to render the text
sudo apt-get install figlet
# Add below lines to your ~./bashrc file. You can remove fonts from the list by adding an # in front of their entry.
# Create a data file if none does exist
if [[ ! -e ~/.terminal-welcome-message ]]; then
echo "Welcome" > ~/.terminal-welcome-message
fi
# Define available fonts (showfigfonts)
@bumbummen99
bumbummen99 / ubuntuDisableMCPLenovo.md
Last active Oct 6, 2022
Ubuntu disable MCP (middle click paste) on Lenovo TrackPoint middle button
View ubuntuDisableMCPLenovo.md

You may have tried to disable the middle click paste (MCP) feature on ubuntu, likely because you work on a notebook/thinkpad or thinkpad keyboard, just to find out that literally every solution to this "issue" does not apply to ubuntu in specific and does just not work. Also since Linux distros have multiple layers of clipboards there are many ways to solve this and to break other functionality at the same time. The obvious solution is to keep the feature enabled but block it on a keymap level for the specific device that should behave "natural". In order to achieve this behaviour we are going to utilize xinput to modify the device mapping. No other device other than the builtin TrackPoint mouse buttons will be affected.

1) Find out the device id

Type in xinput list | grep 'id=' and guess which device is your builtin TrackPoint. Mine is called 'TPPS/2 Elan TrackPoint'

2) Find out which button corrosponds to the middle mouse button

Xinput utilizes a mapping list for all the devices buttons. In orde

@bumbummen99
bumbummen99 / ConvertStringBooleans.php
Created Mar 18, 2019
Converts Strings like 'true', 'on' and 'false' to boolean on Requests in Laravel.
View ConvertStringBooleans.php
<?php
/**
* Based on https://github.com/laravel/ideas/issues/514#issuecomment-299038674
*/
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\TransformsRequest;
@bumbummen99
bumbummen99 / accountmounts.cpp
Last active Dec 1, 2018
TrinityCore 3.3.5a AccountMounts. Kinda Blizzlike account mount sharing. Includes optional faction lock and riding skill sharing
View accountmounts.cpp
#include "Player.h"
class AccountMounts : public PlayerScript
{
static const bool limitrace = true; //Disable share mounts between faction
static const bool limitlevel = true; //Disable share riding with level 1 characters
static const uint8 minRidingLevel = 20; //Minimum level for shared riding skill
public: