Skip to content

Instantly share code, notes, and snippets.

View pengmaradi's full-sized avatar

Xiaoling pengmaradi

View GitHub Profile
@pengmaradi
pengmaradi / typo3-extbase-ajax.md
Created April 23, 2016 19:41
TYPO3 extbase use eID

TYPO3 Extbase Ajax

ext_localconf.php

<?php
if (!defined('TYPO3_MODE')) {
	die('Access denied.');
}
@pengmaradi
pengmaradi / first.md
Last active June 3, 2018 17:28
first shell script

First Shell Script

#!/bin/bash
#for i in "1" "2" "3" "4" "5" "6" "7" "8" "9"
#do
#        for j in "1" "2" "3" "4" "5" "6" "7" "8" "9"
#  do
#          if [ ${j} -lt  ${i} ]

adminer - localhost:8080, apache, mysql

version: '2'
services:
    db:
        image: mysql
        ports:
 - 3306:3306
@pengmaradi
pengmaradi / tx_news-add-layout.md
Last active September 8, 2017 13:16
add templateLayout for news (TYPO3 tx_news)

(altnativ) TCEFORM.tt_content.pi_flexform.news_pi1.template.settings.templateLayout


TCEFORM.tt_content.pi_flexform.news_pi1.template.settings\.templateLayout {
    # <f:if condition="{settings.templateLayout} == 4">
    addItems= 4
    addItems.4 = News Banner (in Headerbild)
}
@pengmaradi
pengmaradi / brew.md
Last active August 7, 2017 16:02
macOS 缺失的软件包管理器 Homebrew

Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"


brew install wget
brew install ImageMagick
@pengmaradi
pengmaradi / Image.html
Created August 7, 2017 10:47 — forked from mdbloch/Image.html
TYPO3 8.7 - Responsive Image
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<picture>
<source srcset="{f:uri.image(image: file, maxWidth: settings.maxImgWidth, cropVariant: 'default')}" media="(min-width: 1200px)">
<source srcset="{f:uri.image(image: file, maxWidth: '992', cropVariant: 'desktop')}, {f:uri.image(image: file, maxWidth: '1984', cropVariant: 'desktop')} 2x" media="(min-width: 992px)">
<source srcset="{f:uri.image(image: file, maxWidth: '768', cropVariant: 'tablet')}, {f:uri.image(image: file, maxWidth: '1536', cropVariant: 'tablet')} 2x" media="(min-width: 768px)">
<source srcset="{f:uri.image(image: file, maxWidth: '768', cropVariant: 'mobile')}, {f:uri.image(image: file, maxWidth: '1536', cropVariant: 'mobile')} 2x" media="(max-width: 767px)">
<!---Fallback--->
<img class="img-responsive" src="{f:uri.image(image: file, maxWidth: settings.maxImgWidth, cropVariant: 'default')}" alt="{image.alternative}" longdesc="{image.description}" title="{image.title}">
</picture>
@pengmaradi
pengmaradi / mac-apache-rewrite.md
Last active August 4, 2017 21:21
/etc/apache2/httpd.conf

# /etc/apache2/httpd.conf

LoadModule rewrite_module libexec/apache2/mod_rewrite.so
# if has php7
#LoadModule php5_module        libexec/apache2/libphp5.so
@pengmaradi
pengmaradi / gridemelment-content2accordion.md
Last active January 9, 2017 07:38
gridelements makes header,textmedia,bullets,table,uploads,multimedia,media,menu as accordion in TYPO3

gridelements works with page TS, typoscript, dataProcessing and fluid templates

  • page ts
tx_gridelements.setup {
    accordion {
        title = Accordion
        alias = accordion
        icon = EXT:custom_template/Resources/Public/Icons/accordion.svg
@pengmaradi
pengmaradi / chmod.md
Last active December 9, 2016 20:20
Do secure chmod.

change the folder or file permission

chgrp -R apache fileadmin typo3conf typo3temp uploads 
chmod -R g+rwX,o-w fileadmin typo3temp typo3conf uploads

su
chown -R root:apache typo3_src
chmod -R 755 typo3_src
chgrp -R www typo3_src
@pengmaradi
pengmaradi / iconfile.md
Last active October 24, 2016 14:16
Extbase iconfile in TYPO3 7.6

Extbase in TYPO3 7.6 has no Icons

TCA/domain.php

'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('exrkey') . 'Resources/Public/Icons/tx_extkey_domain_model_images.gif'
'iconfile' => 'EXT:extkey/Re...',