Skip to content

Instantly share code, notes, and snippets.

View pengmaradi's full-sized avatar

Xiaoling pengmaradi

View GitHub Profile

mysql

mysql create database with utf-8

mysql> CREATE DATABASE `mydb` CHARACTER SET utf8 COLLATE utf8_general_ci;

mysql dump and import

@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 / 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 / stdWrap.md
Created April 27, 2016 17:09
Auflistung der TypoScript Hierarchie von stdWrap:

Auflistung der TypoScript Hierarchie von stdWrap

outerWrap
   wrap3
      prepend
         dataWrap
            wrap2
 noTrimWrap
@pengmaradi
pengmaradi / typo3-6.2.26 sql error
Created August 20, 2016 20:18
TYPO3 6.2.26 sql error
# SQL error: Incorrect integer value: '' for column 'sys_language_uid' at row 1
´´´ SQL
'SYS' => array(
// ...
'setDBinit' => 'SET SESSION sql_mode = \'NO_ENGINE_SUBSTITUTION\';',
// ...
´´´
@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...',
@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} ]
@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 / 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 / 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