Skip to content

Instantly share code, notes, and snippets.

@wojtablo
wojtablo / nodebot.js
Created October 12, 2018 18:02 — forked from Rup1/nodebot.js
Preliminary script. File-watching specific folder using Chokidar, and automating Apple Mail using JXA.
var osa = require('osa2');
var fs = require('fs');
var chokidar = require('chokidar');
var watcher = chokidar.watch('/Users/rup/Desktop/trolls', {
ignored: /(^|[\/\\])\../,
ignoreInitial: true,
persistent: true,
});
@wojtablo
wojtablo / gist:2e2f7eae2df7191fd52d6de8111675a4
Created January 28, 2018 09:42 — forked from bjrnqprs/gist:48c2e693a66ca8f389c3
Typo3 Extbase: Proper way to declare mapping's of tableName and columns.
config.tx_extbase {
persistence {
classes {
Vendor\MyPackage\Domain\Model\Organisation {
mapping {
columns {
tstamp.mapOnProperty = tstamp
hidden.mapOnProperty = hidden
crdate.mapOnProperty = crdate
cruser_id.mapOnProperty = cruserId
<?php
## commentout preVars
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT'] = array(
'preVars' => array(
array(
'GETvar' => 'L',
'valueMap' => '',
'noMatch' => 'bypass',
),
array(
@wojtablo
wojtablo / gist:df4db73451b8f059709ec5213ebe1b37
Created December 17, 2017 23:42 — forked from maddy2101/gist:5668835
TCA, Model and Fluid Partial to display FAL images as a simple gallery using TYPO3 and Extbase 6.1
SQL:
images int(11) unsigned DEFAULT '0',
=======================================================
TCA
....
'images' => array(
'exclude' => 0,
'label' => 'images',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'images',
@wojtablo
wojtablo / .gitlab-ci.yml
Created August 6, 2017 09:16 — forked from koehnlein/.gitlab-ci.yml
simple deployment based on TYPO3 Surf and Gitlab CI
stages:
- deploy
# use caching
cache:
key: "$CI_BUILD_REF_NAME/$CI_BUILD_STAGE"
paths:
- .caches/
variables:
watch -n 5 "ls -lh *.css | awk '{print \$8, \$9, \$10, \$5}'"
@wojtablo
wojtablo / robots.txt
Last active August 25, 2015 23:10 — forked from oliverthiele/robots.txt
robots.txt for TYPO3
User-agent: *
# Only allow URLs generated with RealURL
Disallow: /*?id=*
Disallow: /*&id=*
# L=0 is the default language
Disallow: /*?L=0*
Disallow: /*&L=0*
@wojtablo
wojtablo / Template.html
Last active August 25, 2015 23:09 — forked from oliverthiele/Template.html
Nested TYPO3 Fluid TranslateViewHelper for a localized string with localized date as argument.
<f:translate extensionName="ot_website" id="page_created" arguments="{0: '{f:format.date(date: \'@{data.crdate}\', format: \'{f:translate(id: \\\'formatDate\\\', extensionName: \\\'ot_website\\\')}\')}'}" />
@wojtablo
wojtablo / ModelController.php
Last active August 25, 2015 23:08 — forked from oliverthiele/ModelController.php
Debugging errors like "An error occurred while trying to call Vendor\ExtKey\Controller\ModelController->showAction() " in extbase extensions
/**
* A special action which is called if the originally intended action could
* not be called, for example if the arguments were not valid.
*
* The default implementation sets a flash message, request errors and forwards back
* to the originating action. This is suitable for most actions dealing with form input.
*
* We clear the page cache by default on an error as well, as we need to make sure the
* data is re-evaluated when the user changes something.
*
@wojtablo
wojtablo / realurl_conf.php
Last active August 25, 2015 23:08 — forked from oliverthiele/realurl_conf.php
TYPO3 RealURL-Konfiguration Example
<?php
$TYPO3_CONF_VARS['FE']['addRootLineFields'] .= ',tx_realurl_pathsegment';
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
'_DEFAULT' => array(
'init' => array(
'enableCHashCache' => true,
'appendMissingSlash' => 'ifNotFile,redirect[301]',
'enableUrlDecodeCache' => true,
'enableUrlEncodeCache' => true,
'adminJumpToBackend' => true,