Skip to content

Instantly share code, notes, and snippets.

View Haco's full-sized avatar

Nicolas Scheidler Haco

View GitHub Profile
@einpraegsam
einpraegsam / datamappingExtbase.php
Last active November 3, 2023 16:15
Use DataMapper class in TYPO3 to convert an array into an object
public function mapProperties(): AnyModel
{
$properties = [
'uid' => 123,
'pid' => 123,
'firstname' => 'Alex',
'lastname' => 'Kellner'
'email' => 'my@email.org'
];
$dataMapper = $this->objectManager->get(TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::class);
@Haco
Haco / commandmenu.txt
Last active January 27, 2024 19:55
Haco Counter-Strike 1.6 CFG | 2023 (Config)
"*" "commandmenu Hitman//me" ""
"%" "admin"
{
"%" "Puplic-RCON" "exec /serveradmin/rcon.cfg"
"%" "War-RCON" "exec /serveradmin/rconwar.cfg"
"%" "mapchange"
{
"%" "de-maps1"
{
@sebastianschrama
sebastianschrama / ImagesInside100PercentCol.html
Last active March 15, 2019 12:18
Responsive Images mit TYPO3 7.6 und Fluid Styled Content (FSC) unter Berücksichtigung mehrspaltiger Layouts
{namespace v=FluidTYPO3\Vhs\ViewHelpers}
<f:if condition="{verticalPosition} == 'intext'">
<f:then>
<f:if condition="{columnCount} == '1'">
<f:then>
<f:comment>1 col</f:comment>
<v:media.image
src="{column.media}"
width="400"
@simonw
simonw / wget.md
Created December 9, 2016 06:38
Recursive wget ignoring robots
$ wget -e robots=off -r -np 'http://example.com/folder/'
  • -e robots=off causes it to ignore robots.txt for that domain
  • -r makes it recursive
  • -np = no parents, so it doesn't follow links up to the parent folder
@Voronenko
Voronenko / downgrademysql.md
Last active June 25, 2020 11:45
Downgrade mysql to mysql 5.6 on xenial

Install MySQL 5.6 in Ubuntu 16.04

Ubuntu 16.04 only provides packages for MySQL 5.7 which has a range of backwards compatibility issues with code written against older MySQL versions.

Oracle maintains a list of official APT repositories for MySQL 5.6, but those repositories do not yet support Ubuntu 16.04. However, the 15.10 repos will work for 16.04.

Uninstall existing mysql 5.7 if any

sudo apt remove mysql-client mysql-server libmysqlclient-dev mysql-common
@iamandrewluca
iamandrewluca / MyModel.php
Last active July 1, 2024 12:24
typo3 extbase categories
<?php
/**
* categories
*
* \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category>
* @lazy
*/
protected $categories;
/**
* MyModel constructor.
@htuscher
htuscher / ExtbaseForceLanguage.php
Last active August 29, 2023 11:04
TYPO3 Extbase get record with language different than FE or 0
<?php
namespace Onedrop\Common\Service;
/***************************************************************
* Copyright notice
*
* (c) 2015 Hans Höchtl <hhoechtl@1drop.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
@fcalderan
fcalderan / Jekyll-base64.md
Last active June 24, 2023 19:39
A Base64 image encoder plugin for JekyllRB

#Jekyll Base64 Encoder A Liquid tag for base64 encoding

Note: this plugin requires Colorize:

gem install colorize
@htuscher
htuscher / Cache.php
Created August 4, 2015 07:12
TYPO3 Caching Framework nutzen
<?php
namespace Vendor\MyExtension\Service;
class Caching {
const DEFAULT_CACHE_EXTENSIONKEY = 'my_cache';
/**
@lorenzoaiello
lorenzoaiello / xml2array
Created December 30, 2013 22:31
php xml2array
<?php
function xml2array($contents, $get_attributes=1, $priority = 'tag') {
if(!$contents) return array();
if(!function_exists('xml_parser_create')) {
//print "'xml_parser_create()' function not found!";
return array();
}