Skip to content

Instantly share code, notes, and snippets.

@zdavis
zdavis / siteTSConfig.txt
Created October 13, 2011 18:41
siteTSConfig.txt
TCEMAIN {
# Set default permissions for pages. We tend to limit access to pages using
# page mounts on backend user groups. We find that the permissions settings in the
# access module tend to cause confusion, and that it's better to just let users edit
# any page in the tree to which they have access via a mount. Therefore, we set very
# permissive permissions by default.
permissions {
// 1 is the CIC user
userid = 1
@zdavis
zdavis / usersTSConfig.txt
Created October 13, 2011 18:50
User tsconfig
# Users need to be able to clear the cache in most cases
options.clearCache.pages = 1
options.clearCache.all = 1
# I've never seen a client use bookmarks. We remove them to reduce clutter.
options.enableBookmarks = 0
# Let your users create folders in the extension browser.
options.createFoldersInEB = 1
@radmiraal
radmiraal / gist:1416348
Created December 1, 2011 12:24
Plugin unit test
<?php
/**
* @test
*/
public function renderSetsControllerActionInformationOnRequestObjectIfThePluginHasNoNode() {
$plugin = $this->getAccessibleMock('TYPO3\TYPO3\TypoScript\Plugin', array('getPluginNamespace'));
$plugin->expects($this->any())->method('getPluginNamespace')->will($this->returnValue('typo3_plugin_namespace'));
$plugin->setRenderingContext($this->mockRenderingContext);
$plugin->_set('subRequestBuilder', $this->mockSubRequestBuilder);
@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/
@oodavid
oodavid / README.md
Last active April 6, 2024 18:45 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@g3d
g3d / gist:2709563
Last active February 7, 2024 15:21 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan
@kolber
kolber / fontforge.rb
Created July 30, 2012 11:37
Fontforge homebrew recipe fixes for OSX 10.8
require 'formula'
class Fontforge < Formula
url 'http://downloads.sourceforge.net/project/fontforge/fontforge-source/fontforge_full-20110222.tar.bz2'
head 'git://fontforge.git.sourceforge.net/gitroot/fontforge/fontforge'
homepage 'http://fontforge.sourceforge.net'
md5 '5be4dda345b5d73a27cc399df96e463a'
depends_on 'pkg-config' => :build
depends_on 'gettext'
@frimik
frimik / git-submodule-sync.rb
Created March 9, 2013 19:32
Make damn sure that git submodule sync is going to work.
#! /usr/bin/env ruby
submods = Hash.new
%x{git config -f .gitmodules --get-regexp '^submodule\..*\.(path|url)$'}.lines.each do |l|
submodule, key, value = l.match(/^submodule\.(.*)\.(path|url)\s+(.*)$/)[1..3]
submods[submodule] = Hash.new unless submods[submodule].is_a?(Hash)
submods[submodule][key] = value
end
@maddy2101
maddy2101 / gist:5668835
Last active March 12, 2021 12:08
TCA, Model and Fluid Partial to display FAL images as a simple gallery using TYPO3 and Extbase 6.1
SQL:
images int(11) unsigned DEFAULT '0',
=======================================================
TCA
....
'images' => array(
'exclude' => 0,
'label' => 'images',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'images',
@maddesigns
maddesigns / lib.adaptive-images
Created August 29, 2013 12:15
TYPO3 Snippet for Adaptive Images with <noscript> Sample: http://t3ip.maddesigns.de/examples/adaptive-images-noscript/
#adaptive images lib for TYPO3
lib.adaptive-images = COA
lib.adaptive-images {
1 = TEXT
1.value = <figure class="csc-textpic-imagecolumn###CLASSES###"><noscript
10 = IMG_RESOURCE
10 {
file.import.current = 1
file.maxW = 480
file.override.data = {$styles.content.imgtext.maxW}