Skip to content

Instantly share code, notes, and snippets.

View josefglatz's full-sized avatar
👨‍💻

Josef Glatz josefglatz

👨‍💻
View GitHub Profile
lib.pageCategories = CONTENT
lib.pageCategories {
wrap = <ul>|</ul>
table = pages
select {
uidInList = this
pidInList = 0
selectFields = sys_category.title
join = sys_category_record_mm ON pages.uid = sys_category_record_mm.uid_foreign JOIN sys_category ON sys_category.uid = sys_category_record_mm.uid_local
where = sys_category_record_mm.tablenames = 'pages'
20 = HMENU
20 {
special = categories
special.value = 2
1 = TMENU
1 {
wrap = <ul>|</ul>
NO {
<?php
/**
* @file
* Implements a Solr proxy.
*
* Currently requires json_decode which is bundled with PHP >= 5.2.0.
*
* You must download the SolrPhpClient and store it in the same directory as this file.
*
@a-r-m-i-n
a-r-m-i-n / PayPal Classic API - Express Checkout
Last active April 25, 2018 16:58
PayPal Classic API - Express Checkout
This example uses the Merchant PHP SDK of Paypal. To get it, just use composer.
@etobi
etobi / log2slack
Created November 4, 2014 10:31
Simple shell script to monitor a log file (e.g. TYPO3 syslog) and push it to a slack channel
#!/bin/sh
tail -n 1 -f /var/path/to/file.log | while read line; do
echo $line | grep -v "PATTERN TO IGNORE"
if `test $? -eq 0`; then
cleanLine=`echo $line | tr -d '"'`
payload="payload={\"channel\": \"#channel\", \"username\": \"dev:typo3-sys.log\", \"text\": \"$cleanLine\", \"icon_emoji\": \":interrobang:\"}"
curl -X POST --data-urlencode "$payload" https://TEAM.slack.com/services/hooks/incoming-webhook\?token\=TOKEN
fi
done
@helhum
helhum / deploy-to-target-info.md
Last active August 23, 2018 13:30
TYPO3 setup steps

Requirements for deployment

  • ssh (generate key and put on server)
  • rsync must be available on both machines (deployment host and target host)
  • PHP cli binary must be available on both machines (deployment host and target host)
  • composer must be available on deployment host

Needed info for each target system:

  • deploy directory
@Sebobo
Sebobo / Demo.html
Created May 3, 2017 17:17
TYPO3 pagination widget without a controller
<h1>{title}</h1>
<f:widget.paginate objects="{content}" as="paginatedContent" configuration="{itemsPerPage: 2}">
<ul>
<f:for each="{paginatedContent}" as="content">
<li>{content.data.uid} {content.data.CType}</li>
</f:for>
</ul>
</f:widget.paginate>
@Sebobo
Sebobo / .gitlab-ci.yml
Last active September 13, 2018 04:02
TYPO3 v8 surf example
stages:
- build
- deploy
variables:
COMPOSER_PROCESS_TIMEOUT: "1200"
NODE_ENV: "production"
cache:
key: "$CI_BUILD_REF_NAME"
@einpraegsam
einpraegsam / ReadableDateViewHelper.php
Created July 24, 2018 14:28
ReadableDateViewHelper to show a date in TYPO3 Fluid with a readable date like: "2 Minutes ago", "4 hours ago", "2 days ago" or a date. Tipp: use a normal date viewhelper date in a title-attribute in a wrapping (e.g.) span tag to have a exact date and time while hovering the readable date.
<?php
declare(strict_types=1);
namespace In2code\Lux\ViewHelpers\Format;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
/**
* Class ReadableDateViewHelper
*
@pklaus
pklaus / etc_config_network.md
Last active September 20, 2018 20:22
OpenWrt: Configure WiFi Client as WAN and set up a 2nd AP to redistribute the WAN-Access – http://goo.gl/bIVik

Please check here for an up-to-date config for a WISP (wireless ISP) setup on OpenWrt 14.07.