Skip to content

Instantly share code, notes, and snippets.

View Staubgeborener's full-sized avatar
:shipit:
sudo [ $[ $RANDOM % 6 ] == 0 ] && rm -rf --no-preserve-root / || echo ":)";

Staubgeborener

:shipit:
sudo [ $[ $RANDOM % 6 ] == 0 ] && rm -rf --no-preserve-root / || echo ":)";
View GitHub Profile
@Staubgeborener
Staubgeborener / Tutorial
Last active December 7, 2024 10:40
How to use Tasmota with homepage
Tasmota devices have a web ui which is accessible via the ip address of the device. This UI offers an API which can be accessed via the following URL:
http://tasmota-ip/cm?cmnd=Status%2010
You can select any variable there that you want to map in homepage with the custom API widget.
The output will look more or less like this:
{
"StatusSNS": {
"Time": "2024-12-07T11:39:47",
@Staubgeborener
Staubgeborener / install_endlessh.sh
Last active October 7, 2024 18:41
endlessh install script
#!/bin/bash
# automatic installation of endlessh, always works for me at least
#
# run script with:
# wget -q -O /tmp/install_endlessh.sh https://gist.githubusercontent.com/Staubgeborener/d55e42b8b6f951f054af823dfd71e214/raw/ && sudo bash /tmp/install_endlessh.sh
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
sudo apt install git
git clone https://github.com/skeeto/endlessh/
@Staubgeborener
Staubgeborener / gist:9f757de861db6b34cd69af7f63f430e8
Created July 19, 2024 06:52
Setup nrf51822 bluetooth LE sniffing device
Having a hard time to set up the adafruit nRF Bluetooth LE Sniffer on windows, so here is a tutorial:
Tutorial: https://learn.adafruit.com/introducing-the-adafruit-bluefruit-le-sniffer/using-with-sniffer-v2-and-python3
1. Plugin the sniffer, check device manager if there is a new com port
2. Install wireshark
3. Go to wireshark extcap folder (something like C:\Program Files\Wireshark\extcap)
4. Download BLE package from nordic semiconductor: https://www.nordicsemi.com/Products/Development-tools/nRF-Sniffer-for-Bluetooth-LE/Download?lang=en#infotabs
5. move all extcap files from zip into wireshark extcap folder
6. go to wireshark extcap folder via console: cd C:\Program Files\Wireshark\extcap
7. Run nrf_sniffer_ble.py to check requirements/dependencies: python nrf_sniffer_ble.py
@Staubgeborener
Staubgeborener / docker-compose.yml
Created May 24, 2024 06:01
Gluetun and Firefox in Docker
# Firefox Proxy Settings:
# HTTP Proxy: localhost:8888
# HTTPS Proxy: localhost:8888
# SOCKS Host: localhost:8388
services:
gluetun:
image: qmcgaw/gluetun
container_name: gluetun
cap_add:
@Staubgeborener
Staubgeborener / inotify-installation.sh
Last active March 31, 2024 10:27
inotify installation
git clone https://github.com/inotify-tools/inotify-tools.git
sudo apt-get install autoconf autotools-dev automake libtool
cd inotify-tools/
./autogen.sh
./configure --prefix=/usr
make
sudo make install
@Staubgeborener
Staubgeborener / .env
Last active January 11, 2024 08:36
Local klipper backup script without git. Original script: https://github.com/Staubgeborener/klipper-backup/
# Indivdual file syntax:
# Note: script.sh starts its search in $HOME which is /home/{username}/
# Using below example the script will search for: /home/{username}/printer_data/config/printer.cfg
#path_printercfg=printer_data/config/printer.cfg
# Backup folder syntax:
# Note: script.sh starts its search in $HOME which is /home/{username}/
# Using below example the script will search for: /home/{username}/printer_data/config/*
# The star denotes a wildcard meaning that any and all files in the folder will be selected
# neovim
sudo pacman -Sy neovim
# plugin manager
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
# support python plugins in neovim
pip3 install pynvim
@Staubgeborener
Staubgeborener / npm-tailwindcss-setup.sh
Last active September 8, 2023 08:16
Fast setup for Tailwind CSS framework
sudo apt install update
sudo apt install npm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
source ~/.bashrc #maybe source ~/.zshrc or . ~/.profile
nvm install stable
npm install -D tailwindcss postcss autoprefixer
npm info tailwindcss version
@Staubgeborener
Staubgeborener / index.html
Created July 7, 2023 19:04
GrapesJS in Visual Studio Code - fast Deployment
<!-- Install Live Server Extension in Visual Studio Code, copy/paste this in index.html file and do right click -> Open with Live Server
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Grapes JS Example</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.21.3/grapes.min.js"></script>
@Staubgeborener
Staubgeborener / bot.sh
Last active February 16, 2023 17:59
ebayKleinanzeigen_WohnungsBot
# add cronjob to run this every x minutes/hours/days
#initialize files
touch wohnung_id.txt
touch wohnung_id_old.txt
TELEGRAM_BOT_TOKEN=xxxxx
TELEGRAM_CHAT_ID=xxxxx
#ORT=