Skip to content

Instantly share code, notes, and snippets.

View josefglatz's full-sized avatar
👨‍💻

Josef Glatz josefglatz

👨‍💻
View GitHub Profile
@josefglatz
josefglatz / gitlab-gmail-smtp-example.yml
Created April 7, 2015 15:19
Gitlab Gmail SMTP Configuration Google Apps
# /etc/gitlab/gitlab.rb
gitlab_rails['gitlab_email_from'] = "[email protected]"
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.gmail.com"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "[email protected]"
gitlab_rails['smtp_password'] = "NicePassword"
gitlab_rails['smtp_domain'] = "owndomain.at"
gitlab_rails['smtp_authentication'] = :plain
@josefglatz
josefglatz / RealUrlAutoConfiguration.php
Created July 10, 2015 08:15
TYPO3 6.2 RealUrl Autoconf Hook Example disable RealUrl Caches
<?php
namespace O10\Theme\Configuration;
/**
* $DESCRIPTION$
*
* @author Josef Glatz <[email protected]>
* @package $PACKAGE$
* @subpackage $SUBPACKAGE$
*/
@josefglatz
josefglatz / class.ext_update.php
Created August 17, 2015 15:02
ext:typoscript2ce Update script v0.1.0 to v1.0.2
<?php
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
@josefglatz
josefglatz / t3o.dev.conf
Created November 12, 2015 08:31
NGINX (possible) TYPO3 Configuration
#
# Nginx config - hostname t3o.dev
#
server {
listen 80 default_server;
root /var/www/t3o/htdocs;
index index.php index.html index.htm;
server_name t3o.dev;
lib.SysCategoryList = CONTENT
lib.SysCategoryList {
stdWrap.dataWrap = <div id="c{field:contentUid}-filter-{field:filterGroup}" class="button-group categories-list categories-list-filter--{field:filterGroup}" data-filter-group="c{field:contentUid}-{field:filterGroup}"><button class="button reset-mobile is-checked" data-filter="">{LLL:EXT:theme/Resources/Private/Language/locallang.xlf:menu.filterReset}</button>|</div>
table = sys_category
select {
languageField = sys_language_uid
selectFields = uid,title
where {
data = field:parentCategories
intval = 1
@josefglatz
josefglatz / Uploads.setupts
Created December 16, 2015 19:49
TYPO3 6.2 TypoScript Only Drop In Replacement for CSC v4.5 && removed ext:css_filelinks
tt_content.uploads {
wrap = <div class="filelinks">|</div>
// drop in replacement for ext:css_filelinks
200 = COA
200 {
10 = FILES
10 {
references {
table = tt_content
@josefglatz
josefglatz / NewsListSidebar.setupts
Created January 15, 2016 13:19
TYPO3 ext:news example sidebar latest news with custom caching
pageNewsLatestSidebar = PAGE
pageNewsLatestSidebar {
stdWrap.cache {
key = newsLatestSidebar
tags = tx_news
lifetime = 604800
}
typeNum = 144915
config {
disableAllHeaderCode = 1
@josefglatz
josefglatz / NewsLatestFooter.setupts
Last active January 15, 2016 13:22
TYPO3 example COA with custom caching
lib.ext.news.latestFooter = COA
lib.ext.news.latestFooter {
// define custom cache tag and lifetime
cache {
key = newsLatestFooter
tags = tx_news
lifetime = 604800
}
// any content (in this case a news latest plugin which should be rendered on many pages)
10 = CONTENT
lib.View.SingleSujet = FILES
lib.View.SingleSujet {
references {
table = tx_news_domain_model_news
uid.data = GP:tx_news_pi1|news
fieldName = fal_media
}
begin = 0
maxItems = 1
@josefglatz
josefglatz / count+groupby-example.sql
Created April 20, 2016 10:43
MySQL Count GroupBy Combo (e.g. TYPO3 Camp T-Shirt overview ;-] )
# Create a database table
# Add necessary fields
# Import csv and map fields
# run if you table is named "Shirts" and the T-Shirt size column is named "Size"
SELECT Size,COUNT(*) FROM Shirts GROUP BY Size;