Skip to content

Instantly share code, notes, and snippets.

View mneuhaus's full-sized avatar

Marc Neuhaus mneuhaus

View GitHub Profile
@mneuhaus
mneuhaus / cloudSettings
Created January 6, 2022 11:54
Visual Studio Code Settings Sync Gist
{"lastUpload":"2022-01-06T11:54:52.110Z","extensionVersion":"v3.4.3"}
{
"constants": {
"activeFieldTrialGroups": [],
"addressFamily": {
"ADDRESS_FAMILY_IPV4": 1,
"ADDRESS_FAMILY_IPV6": 2,
"ADDRESS_FAMILY_UNSPECIFIED": 0
},
"certStatusFlag": {
"AUTHORITY_INVALID": 4,
# ----------------------------------------------------------------------#
# Live environment #
# ----------------------------------------------------------------------#
production/host = foo.com
production/user = bar
production/port = 22
production/path = /var/www/foo.com/
define production/shell
ssh $(production/user)@$(production/host) -p$(production/port) 'cd $(production/path) &&$1'
<?php
class ProductMapping extends AbstractMapping {
/**
* Type/Name of the coremedia content
*
* @var string
*/
protected $sourceType = 'pim_product';
@mneuhaus
mneuhaus / ext_localconf.php
Created February 17, 2012 00:38
Backend Layout Condition for TypoScript
<?php
function user_beLayout($layout) {
if($GLOBALS["TSFE"]->page["backend_layout"] > 0 && $GLOBALS["TSFE"]->page["backend_layout"] == $layout)
return true;
foreach ($GLOBALS["TSFE"]->rootLine as $page)
if($page["backend_layout_next_level"] > 0 && $page["backend_layout_next_level"] == $layout)
return true;
<?php
class ApiController {
/**
* @Route("/api/search")
*/
public function searchAction(Request $request){
$request->get('value');
...do a search...
}
<?php
class BEAUTIFUL {
public function __call($action, $arguments) {
switch($action) {
case: 'terrificMethod':
return 'build a wall and ' . $arguments[0] . '!';
default:
die('FAKE METHOD');
}
<?php
$structure = [
'type' => 'Form',
'id' => 'test',
'label' => 'Some form',
'children' => [
'default' => [
'type' => 'Sheet',
'label' => 'Sheet label',
'description' => 'Sheet description',
SELECT
*,
(
CASE
WHEN title LIKE "%keyword%" AND crdate > 1400000090 THEN 1
WHEN textmodules LIKE "%keyword%" AND crdate > 1400000090 THEN 2
WHEN title LIKE "%keyword%" THEN 3
WHEN textmodules LIKE "%keyword%" THEN 4
ELSE 10
END
{namespace v=FluidTYPO3\Vhs\ViewHelpers}
{namespace flux=FluidTYPO3\Flux\ViewHelpers}
{namespace t=Famelo\Template\ViewHelpers}
<f:layout name="Content" />
<f:section name="Configuration">
<flux:form id="event-registration" options="{group: 'forms'}" label="Registrierungsformular für Veranstaltung">
<flux:field.input name="title" label="Veranstaltungsname" required="1" />
<flux:field.text name="introduction" label="Einleitung" rows="3" enableRichText="1" />
<flux:field.text name="information" label="Veranstaltungsinformationen" rows="3" enableRichText="1" />