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
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:
<?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(); |
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] |
#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="..." | |
<f:form.validationResults for="{for}"> | |
<f:if condition="{validationResults.flattenedErrors}"> | |
<div class="alert alert-danger alert-dismissable"> | |
<button type="button" class="close" data-dismiss="alert" aria-hidden="true" title="Schließen">×</button> | |
<p> | |
Leider waren einige Eingaben im Formular nicht korrekt. | |
</p> | |
<f:for each="{validationResults.flattenedErrors}" key="propertyPath" as="errors"> | |
<div class="row"> | |
<div class="col-md-3"> |
<?php | |
namespace KayStrobach\Project\Aspects; | |
use TYPO3\Flow\Annotations as Flow; | |
/** | |
* Wraps around the \TYPO3\Flow\Cli\Response | |
* | |
* @Flow\Aspect |
Doctrine in TYPO3 FLOW ORM/* {#doctrine} | |
=================================== | |
Einfache Datentypen (Attribute) | |
------------------------------- | |
@code | |
class Blog { | |
/** | |
* @var string |
public function findAllByCoordinatesDistance($coordinates, $distance) { | |
$earthRadius=6367.41; | |
if($distance[strlen($distance)-1] = 'm'){ | |
$earthRadius=$earthRadius/1.609; | |
$distance = intval($distance); | |
} | |
// prepare for injections | |
$distance = floatval($distance); |
<?php | |
namespace Vendor\Extension\ViewHelpers; | |
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper; | |
class GetRecordAsViewHelper extends AbstractViewHelper { | |
/** | |
* @param string $table |