Skip to content

Instantly share code, notes, and snippets.

@pniederlag
pniederlag / tt_content and Extbase Domain Model
Created February 5, 2011 14:57
mappings and subclasses for extbase
config.tx_extbase {
persistence{
classes {
Tx_Foo_Domain_Model_ContentElement {
# define the subclasses
subclasses {
Tx_Foo_Domain_Model_Ce1 = Tx_Foo_Domain_Model_Ce1
Tx_Foo_Domain_Model_Ce2 = Tx_Foo_Domain_Model_Ce2
}
mapping {
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@kathangeorg
kathangeorg / ts.ts
Created May 2, 2012 14:08
Typo3 TypoScript Variablen wie page : uid auslesen
temp.typo3Variable = COA
temp.typo3Variable {
5 = TEXT
5 {
# Datum
insertData = 1
data = date : d-m-y
wrap = <p> Das Datum heute: | </p>
}
@liamcurry
liamcurry / gist:2597326
Created May 4, 2012 19:56
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@marcedwards
marcedwards / high-dpi-media.css
Last active November 19, 2023 12:56
A CSS media query that captures almost all high DPI aware devices.
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */
@JamieMason
JamieMason / html-languages.txt
Created September 19, 2012 08:50
HTML lang attribute / ISO language code reference / Culture names
CULTURE SPEC.CULTURE ENGLISH NAME
--------------------------------------------------------------
Invariant Language (Invariant Country)
af af-ZA Afrikaans
af-ZA af-ZA Afrikaans (South Africa)
ar ar-SA Arabic
ar-AE ar-AE Arabic (U.A.E.)
ar-BH ar-BH Arabic (Bahrain)
ar-DZ ar-DZ Arabic (Algeria)
ar-EG ar-EG Arabic (Egypt)
@nichtich
nichtich / README.md
Last active May 20, 2024 07:48 — forked from oodavid/README.md
How to automatically deploy from GitHub

Deploy your site with git

This gist assumes:

  • you have an online remote repository (github / bitbucket etc.)
  • you have a local git repo
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by Apache
  • the Apache user is named www-data (may be apache on other systems)
@Plou
Plou / date.xml
Created June 13, 2013 13:53
Example of a flexform with text, rich text editor (rte), file (image), date and multiple items (flexform sections)
<dateName>
<TCEforms>
<label>LLL:EXT:skinFlex/flex/locallang.xml:flexform.flex.dateName</label>
<config>
<type>input</type>
<eval>date</eval>
</config>
</TCEforms>
</dateName>
@noelboss
noelboss / page_tsconfig.txt
Created November 21, 2013 14:18
How to configure gridelements for Typo3 purely with TypoScript and TSconfig and thus living in files. Based on this article: http://www.networkteam.com/blog/post/gridelements-professionell-nutzen.html
# Page TSConfig:
tx_gridelements.setup {
# ID of Element
1 {
title = Two Columns
config {
colCount = 2
rowCount = 1
rows {
1 {
@InvisibleKind
InvisibleKind / MyController.php
Last active May 14, 2019 14:00
FAL handling in FlexForms
public function indexAction() {
/** @var \TYPO3\CMS\Core\Resource\ResourceFactory $resourceFactory */
$resourceFactory = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\ResourceFactory');
$fileReference = $resourceFactory->getFileReferenceObject($this->settings['test']);
$fileArray = $fileReference->getProperties();
$this->view->assign('image', $fileArray);
}