Skip to content

Instantly share code, notes, and snippets.

View pixelbrackets's full-sized avatar
🧑‍🎓
Looking at other things right now

Dan Kleine (geb. Dan Untenzu) pixelbrackets

🧑‍🎓
Looking at other things right now
View GitHub Profile
@pixelbrackets
pixelbrackets / gist:11212440
Last active August 29, 2015 14:00
keybase.md
### Keybase proof
I hereby claim:
* I am pixelbrackets on github.
* I am pixelbrackets (https://keybase.io/pixelbrackets) on keybase.
* I have a public key whose fingerprint is ADCC BE32 2D40 2E9A 4465 2BEC B5BF 7C80 2001 256F
To claim this, I am signing this object:
@pixelbrackets
pixelbrackets / homepage.html
Last active August 29, 2015 14:13
Allow/Deny Content Elements in FLUX grids
<!-- Allow ONLY the FCE »Slider« in a column -->
<flux:grid>
<flux:grid.row>
<flux:grid.column name="sliderContent" colPos="1" variables="{allowedContentTypes: 'fluidcontent_content', Fluidcontent: {allowedContentTypes: 'Vendorname.some_extension_key:Slider.html'}}" />
</flux:grid.row>
<flux:grid.row>
<flux:grid.column name="mainContent" colPos="0" variables="{Fluidcontent: {deniedContentTypes: 'Vendorname.some_extension_key:Slider.html'}}" />
</flux:grid.row>
</flux:grid>
@pixelbrackets
pixelbrackets / GroupedForViewHelper.php
Created October 28, 2015 13:57
Add the iteratition feature of the TYPO3 Fluid ForViewHelper to the GroupedForViewhelper
<?php
namespace Pixelbrackets\AcmeSitepackage\ViewHelpers;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
/**
* Grouped loop viewhelper
*
* Iterates through elements and groups them by a specified property first
*
@pixelbrackets
pixelbrackets / bash
Created January 7, 2013 18:47
Use gzip for imports and exports in MySQL
#export
mysqldump -u username -p dbname | gzip > dbdump.sql.gz
#import
zcat dbdump.sql.gz | mysql -u username -p dbname
@pixelbrackets
pixelbrackets / .htaccess
Last active December 12, 2015 04:38
Combine several language dependend sitemaps using EXT:dd_googlesitemap in TYPO3
#RewriteRule ^sitemap.xml$ /?eID=dd_googlesitemap [L]
RewriteRule ^sitemap_de.xml$ /?eID=dd_googlesitemap&L=0 [L]
RewriteRule ^sitemap_en.xml$ /?eID=dd_googlesitemap&L=1 [L]
@pixelbrackets
pixelbrackets / Phing.sublime-build
Created March 11, 2013 11:26
Sublime 2 Phing Package
{
// Installation: Move into package folder (~/.config//sublime-text-2/Packages/Phing/Phing.sublime-build)
// Usage: Select »Phing« in »Build System«, hit »Strg+B« to build
// Package depends on a sublime project → The project root is a git repository (~/git/hello-world/), the phing files need to be stored inside a »build« subdirectory (~/git/hello-world/build/)
"selector": "phing",
"working_dir":"$file_path",
"shell":true,
@pixelbrackets
pixelbrackets / tx_versionCheck.php
Created July 2, 2013 09:44
TYPO3 Version Check for extensions
$version = class_exists('t3lib_utility_VersionNumber')
? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version)
: t3lib_div::int_from_ver(TYPO3_version);
if ($version < 4006000) {
// do stuff for TYPO3 < 4.6
}
// Version Integer = [Major version XX][Minor version XX][Patch versions XXX] - e.g. »4.7.12« = »4007012«
// Read some discussions about the version check in the mailing list: http://typo3.3.n7.nabble.com/Second-Meeting-for-TYPO3-6-2-LTS-Release-td243944.html
@pixelbrackets
pixelbrackets / f-widget-paginate-style.md
Last active July 18, 2016 09:35
CSS for Fluid Pagination Widget in TYPO3 Flow

CSS for Fluid Pagination Widget in TYPO3 Flow

CSS

<style type="text/css">
	.typo3-widget-paginator {
		display: inline-block;

border-radius: 4px;

@pixelbrackets
pixelbrackets / DomainByLinkViewHelper.php
Created September 13, 2016 13:58
TYPO3 ViewHelper to return domain of a given link - usefull eg. for conditions with domain names (“if link points to »twitter.com«, then…”)
<?php
namespace Pixelbrackets\AcmeExtension\ViewHelpers;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
/**
* Returns the domain of a given link
*
* = Examples =
*
@pixelbrackets
pixelbrackets / usertsconfig.ts
Last active September 22, 2016 12:09
Blind menu items in TYPO3 Info module
/*
If you blind a menu item (e.g. let an editor edit translations, but dont show him tsconfig),
then check for all currently registered keys in the configuration module.
Open the configuration module in TYPO3 backend and select the option »BE Modules Extensions«.
This will show a tree. Just copy the key names and adjust the following snippet to your needs.
Warning: This will just blind the option, it is not an access check.
*/