Skip to content

Instantly share code, notes, and snippets.

View eliashaeussler's full-sized avatar
🐛
Out there, looking for bugs.

Elias Häußler eliashaeussler

🐛
Out there, looking for bugs.
View GitHub Profile
@eliashaeussler
eliashaeussler / telekom_appointment_tracker.sh
Last active October 30, 2023 17:31
Track customer count and travel time of a Telekom appointment
#!/usr/bin/env bash
# shellcheck disable=SC2155
set -e
#
# Script to track waiting customer count and estimated travel time
# of a Telekom appointment.
#
# Usage:
# ./telekom_appointment_tracker.sh <uuid>
@eliashaeussler
eliashaeussler / query_page_tree.sql
Created August 7, 2023 14:47
Query TYPO3 page tree with MySQL 8+
set @rootPageId := 15047;
set @maxDepth := 99;
with recursive children as (
select root.*, 1 as depth
from pages root
where root.uid = @rootPageId
or (root.sys_language_uid > 0 and root.l10n_source = @rootPageId)
and root.deleted = 0
union all
@eliashaeussler
eliashaeussler / Filter.php
Last active November 18, 2020 17:42
Filter by Git repositories in Symfony Finder
<?php
declare(strict_types=1);
namespace EliasHaeussler\App;
/*
* Copyright (C) 2020 Elias Häußler <elias@haeussler.dev>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@eliashaeussler
eliashaeussler / check_for_gitlab_update.sh
Last active June 8, 2020 17:21
GitLab Omnibus version check
#!/usr/bin/env bash
## Requirements:
## * jq: https://stedolan.github.io/jq/
## * GitLab auth token: https://gitlab.example.com/profile/personal_access_tokens
GITLAB_DOMAIN="https://gitlab.example.com"
AUTH_TOKEN="<insert GitLab auth token here>"
CURRENT_VERSION="$(curl -s -H "Authorization: Bearer ${AUTH_TOKEN}" "${GITLAB_DOMAIN}/api/v4/version" | jq -r '.version')"
STABLE_VERSION="$(curl -s https://gitlab.com/api/v4/projects/13083/repository/tags | jq -r '[ .[] | .name | match("^v?(\\d+\\.\\d+\\.\\d+)$") | .captures[0].string ] | sort_by(split(".") | map(tonumber))[-1]')"
@eliashaeussler
eliashaeussler / HideLanguageByRecordOverlayProcessor.php
Last active September 11, 2019 11:52
HideLanguageByRecordOverlayProcessor for TYPO3 CMS – made at @undkonsorten
<?php
declare(strict_types=1);
namespace Undkonsorten\BlockMenu\DataProcessing;
/*
* This file is part of the TYPO3 CMS extension "block_menu".
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
@eliashaeussler
eliashaeussler / dcssh
Last active April 14, 2019 17:31
Bash into Docker container (with local aliases) using docker-compose
#!/bin/bash
set -e
CONTAINER="${1-server}"
COMMAND="$2"
CONTAINER_ID="$(docker-compose ps -q "$CONTAINER")"
if [[ $(docker-compose ps --services | grep "$CONTAINER") ]]; then
COMPOSE_COMMAND="exec"
else
@eliashaeussler
eliashaeussler / .editorconfig
Created May 10, 2018 22:29
Editorconfig for Frontend projects
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
[*.{js,scss,html}]
charset = utf-8
indent_style = space
indent_size = 2

Keybase proof

I hereby claim:

  • I am eliashaeussler on github.
  • I am eliashaeussler (https://keybase.io/eliashaeussler) on keybase.
  • I have a public key ASDhg3WkBQhKp66xcYkLysjLYDnQRExG7cK5udEhn81HQgo

To claim this, I am signing this object: