Skip to content

Instantly share code, notes, and snippets.

View kaystrobach's full-sized avatar
🎯
Focusing

Kay Strobach kaystrobach

🎯
Focusing
View GitHub Profile
@kaystrobach
kaystrobach / automation_for_remote.yaml
Created March 2, 2023 16:16
Remote automation for typical dimmer switch with home assistant
alias: "Arbeitszimmer: Rollo"
description: ""
trigger:
- device_id: 98e90028cce28707c8ae4eccd5923d88
domain: zha
platform: device
type: remote_button_short_press
subtype: button_1
id: top
- device_id: 98e90028cce28707c8ae4eccd5923d88

title: Using hugo with gitlab CI including review apps in gitlab pages author: Kay Strobach layout: post date: 2022-07-29T10:56:01+00:00 categories:

  • Nützliches
  • WebDev
  • Gitlab
  • hugo
@kaystrobach
kaystrobach / CreateBarCode.php
Last active May 20, 2022 07:01
Convert UUIDs into BigInt with ramsey/uuid
<?php
// needs picqer/php-barcode-generator
$generator = new \Picqer\Barcode\BarcodeGeneratorPNG();
$barcode = $generator->getBarcode($data, $generator::TYPE_CODE_128, 3, 100, [0,0,0]);
// ensure the char count is even for CODE_128_C
$barcodeData = (strlen($data) % 2) === 0 ? $data : '0' . $data;
$generator = new \Picqer\Barcode\BarcodeGeneratorPNG();
@kaystrobach
kaystrobach / .htaccess
Created June 7, 2019 10:49
.htaccess für allinkl.com
php_flag log_errors on
php_value error_log "/www/htdocs/w018dcee/logs/phplog-typo3.log"
RewriteEngine On
RewriteRule ^typo3$ - [L]
RewriteRule ^typo3/.*$ - [L]
RewriteRule ^fileadmin$ - [L]
RewriteRule ^fileadmin/.*$ - [L]
@kaystrobach
kaystrobach / bash.sh
Last active May 4, 2016 09:03
Gitlab Important Mattermost commands ...
#raise user rights
cd /opt/gitlab/embedded/service/mattermost/i18n
sudo -u mattermost /opt/gitlab/embedded/bin/mattermost -config="/var/opt/gitlab/mattermost/config.json" -assign_role -team_name="..." -email="..." -role="system_admin"
#delete team
cd /opt/gitlab/embedded/service/mattermost/i18n
sudo -u mattermost /opt/gitlab/embedded/bin/mattermost -config="/var/opt/gitlab/mattermost/config.json" -permanent_delete_team=true -team_name="..."
@kaystrobach
kaystrobach / GetRecordAsViewHelper.php
Created September 17, 2015 09:47
An ugly viewHelper to get a record from the database ...
<?php
namespace Vendor\Extension\ViewHelpers;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
class GetRecordAsViewHelper extends AbstractViewHelper {
/**
* @param string $table
@kaystrobach
kaystrobach / keybase.md
Created February 20, 2015 18:02
keybase.md

Keybase proof

I hereby claim:

  • I am kaystrobach on github.
  • I am kaystrobach (https://keybase.io/kaystrobach) on keybase.
  • I have a public key whose fingerprint is 123F E8E3 C364 C8B5 BAB3 E358 6A25 38B4 6DA3 F62F

To claim this, I am signing this object:

@kaystrobach
kaystrobach / jQuerySelectElement.js
Created October 28, 2014 14:08
jQuery: SelectElement: use $('#passwordVisible').selectElement();
$.fn.selectElement = function() {
var text = $(this).get(0);
var range = null;
if (document.body.createTextRange) { // ms
range = document.body.createTextRange();
range.moveToElementText(text);
range.select();
} else if (window.getSelection) { // moz, opera, webkit
var selection = window.getSelection();
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">
<template>
<style>
<?php
class Tx_beskin_Be_PreHeaderRenderHook {
function main($arg) {
/** @var \t3lib_PageRenderer $pagerenderer*/
$pagerenderer = $arg['pageRenderer'];
$extConfigs = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['beskin']);
$paths = array ();