Skip to content

Instantly share code, notes, and snippets.

View garbast's full-sized avatar

Sebastian Fischer garbast

View GitHub Profile
@garbast
garbast / gist:586b0c209f1c1f597ae9e28fca1e48dc
Created September 18, 2025 13:50
Get an absolute path for a local TYPO3 FAL file
private function absFilePath(File $file): string
{
$path = $file->getIdentifier();
$folder = $file->getStorage()->getConfiguration()['basePath'];
return GeneralUtility::getFileAbsFileName(rtrim($folder, '/') . $path);
}
@garbast
garbast / card.yaml
Created June 20, 2025 15:15
polleninformation eu card
square: true
type: grid
columns: 4
cards:
- type: custom:mushroom-template-card
entity: sensor.polleninformation_essen_grass
primary: Gras
icon: mdi:grass
layout: vertical
icon_color: |-
@garbast
garbast / .env
Last active February 15, 2025 16:07
Stripped down web server setup
INSTANCE_FOLDER=/srv/website-NAME
DATA_FOLDER=/mnt/Docker/website-NAME
BACKUP_FOLDER=/mnt/Backups/website-NAME
APP_NAME=website-NAME
MYSQL_PORT=3308
MYSQL_ROOT_PASSWORD="YOUR_ROOT_PASSWORD"
MYSQL_PRODUCTION_PASSWORD="YOUR_PRODUCTION_PASSWORD"
MYSQL_STAGING_PASSWORD="YOUR_STAGING_PASSWORD"
@garbast
garbast / luarc
Created June 21, 2024 20:43
Set creation date on export in darktable .config/darktable/luarc
local darktable = require 'darktable'
local function set_create_date(event, image, filename, format, storage)
local pattern = '(%d+):(%d+):(%d+) (%d+):(%d+):(%d+)'
local timeToConvert = image.exif_datetime_taken
local runyear, runmonth, runday, runhour, runminute, runseconds = image.exif_datetime_taken:match(pattern)
local convertedTimestamp = os.time({year=runyear, month=runmonth, day=runday, hour=runhour, min=runminute, sec=runseconds})
local convertedDate = os.date('%Y%m%d%H%M.%S', convertedTimestamp)
@garbast
garbast / Dockerfile
Created August 6, 2023 12:32
Composer image with rsync and mysql client
# docker build -t composer:test - < Dockerfile
FROM composer:latest
RUN set -eux ; \
apk add --no-cache \
rsync \
mysql-client
#!/bin/csh
# cfan.sh
# Manaual control over fans in PfSense (FreeBSD) on a Dell PowerEdge R210 ii system
# Original script: https://www.garron.me/en/bits/specify-editor-crontab-file.html
# Install:
# sudo pkg install ipmitool
# Add ipmi_load="YES" to /boot/loader.conf
# Add this script to /usr/bin/
# Add * * * * * /bin/csh /usr/bin/cfan.sh to cron file with sudo crontab -e
# Reboot
@garbast
garbast / DateFormatter.php
Last active August 25, 2021 12:41
Generate link to single news with date in path segment and ignore it in resolve
<?php
namespace Cp\CpSitepackage\Routing\Aspect;
class DateFormatter
{
public function format($value, $format = 'd.m.Y'): string
{
return date($format, $value);
}
@garbast
garbast / .gitlab-ci.yml
Created March 8, 2019 12:00
Deployment with deployerphp and gitlabci
cache:
paths:
- $CI_PROJECT_DIR/cache
- $CI_PROJECT_DIR/vendor
- $CI_PROJECT_DIR/.Build/vendor
stages:
- composer
- deploy
Level 1 - Tutorial 1
{spellName:"Tutorial 1",uuidMost:-9212014085409912628L,validSpell:1b,spellList:[0:{spellPosX:4,spellData:{spellKey:"trickDebug",params:{psi.spellparam.number:0,psi.spellparam.target:2}},spellPosY:3},1:{spellPosX:4,spellData:{spellKey:"selectorCaster",params:{}},spellPosY:4}],uuidLeast:-7812281509448144908L}
Level 2 - Tutorial 2
{spellName:"Tutorial 2",uuidMost:-5142199122538312424L,validSpell:1b,spellList:[0:{spellPosX:3,spellData:{spellKey:"connector",params:{psi.spellparam.target:2}},spellPosY:3},1:{spellPosX:3,spellData:{spellKey:"constantNumber",params:{},constantValue:"2"},spellPosY:4},2:{spellPosX:4,spellData:{spellKey:"trickDebug",params:{psi.spellparam.number:3,psi.spellparam.target:2}},spellPosY:3},3:{spellPosX:4,spellData:{spellKey:"selectorCaster",params:{}},spellPosY:4}],uuidLeast:-9206572619882318113L}
Level 3 - Tutorial 3
{spellName:"Tutorial 3",uuidMost:7403931311755382661L,validSpell:1b,spellList:[0:{spellPosX:3,spellData:{spellKey:"operatorEntityLook",params:{psi.spellp
<body>
<div id="mapper">
<table>
<row
v-for="row in rows"
v-bind:row="row"
v-bind:key="row.id">
</row>