Skip to content

Instantly share code, notes, and snippets.

View Isengo1989's full-sized avatar
🏠
Working from home

Micha Hobert Isengo1989

🏠
Working from home
View GitHub Profile
@Isengo1989
Isengo1989 / .env.dist
Last active March 11, 2025 16:28
Iterate through folders and convert your audiobooks from aax to m4b with ffmpeg to have a local backup or push audiobooks to audiobookshelf.
ACTIVATION_KEY=xxxxxxxx
@Isengo1989
Isengo1989 / generate.sh
Created January 21, 2025 09:48
Generate Field table for shopware 6 docs
#!/bin/bash
# Directory to search
DIRECTORY="src/Core/Framework/DataAbstractionLayer/Field"
# Print the table header
echo "| Name | Description | Extends | Implements StorageAware |"
echo "|:-----------------------------|:-----------------------------------------|:----------------------|:----------------------|"
# Iterate over each file ending with *Field.php in the specified directory
@Isengo1989
Isengo1989 / eod.sh
Last active April 12, 2024 06:53
Small script to save EOD (end of day) / work log messages and output them when needed. Can also be used to publish via Slack webhook
#!/bin/bash
# Use a variable for the text file name
textFileName="/home/YOUR_USER/eod.txt"
# Config variable for time logging (adds datetime infront of each entry)
timeLogged=false
# Slack webhook URL (only used on publish)
slackWebhook="https://hooks.slack.com/services/XXXXXXXXXXXXXXXX/XXXXXXXXXXXXX/XXXXXXXXXXXXXXXXXXX"
@Isengo1989
Isengo1989 / motion-illuminance.yaml
Created February 1, 2024 08:29 — forked from Danielbook/motion-illuminance.yaml
Motion and Illuminance level
blueprint:
name: Motion-activated Light with illuminance
description: Turn on a light when motion is detected and illuminance is below a set Lux level.
domain: automation
input:
motion_entity:
name: Motion Sensor
selector:
entity:
domain: binary_sensor
This file has been truncated, but you can view the full file.
@Isengo1989
Isengo1989 / LoginSuccessHandler.php
Last active November 19, 2018 18:04 — forked from marydn/LoginSuccessHandler.php
Custom URL redirect by role after success login on Symfony 2 using a service listener without FOSUser Bundle.
# src/Security/LoginFormAuthenticator.php
<?php
namespace App\Security;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;