Skip to content

Instantly share code, notes, and snippets.

@sebkln
sebkln / RequestMiddlewares.php
Created January 6, 2024 15:48
Middleware for web manifest in TYPO3 v12. Adjusted version of the solution provided by Kevin Appelt in TYPO3 Slack: https://typo3.slack.com/archives/C025BQLFA/p1680299950579649
<?php
return [
'frontend' => [
'yourvendor/webmanifest' => [
'target' => \YourVendor\Sitepackage\Middleware\Webmanifest::class,
'before' => [
'typo3/cms-frontend/page-resolver',
],
'after' => [
@dennisnissle
dennisnissle / functions.php
Created August 9, 2018 10:41
Change default title options order
<?php
add_filter( 'woocommerce_gzd_title_options', 'my_child_add_new_title', 10, 1 );
function my_child_add_new_title( $titles ) {
$titles[1] = __( 'Ms.', 'woocommerce-germanized' );
$titles[2] = __( 'Mr.', 'woocommerce-germanized' );
return $titles;
}
@markhowellsmead
markhowellsmead / fluidcontent_content_hide.txt
Created April 9, 2015 12:25
TYPO3: hide backend fields when extension fluidcontent_content is in use
TCEFORM.tt_content {
header.types.fluidcontent_content.disabled = 1
header_link.types.fluidcontent_content.disabled = 1
header_position.types.fluidcontent_content.disabled = 1
header_layout.types.fluidcontent_content.disabled = 1
date.types.fluidcontent_content.disabled = 1
}
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active March 17, 2026 17:51
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@Mabahe
Mabahe / gist:6038018
Last active December 19, 2015 23:59
Solution for indexing sys_category in ext:solr in TYPO3 with unmerged https://review.typo3.org/#/c/22415/ and unfixed http://forge.typo3.org/issues/44961
plugin.tx_solr.index.queue {
pages.fields {
tags_textM = SOLR_MULTIVALUE
tags_textM {
cObject = CONTENT
cObject {
table = pages
select {
uidInList = this
pidInList = 0
@Warry
Warry / Article.md
Created December 11, 2012 00:11
How to make faster scroll effects?

How to make faster scroll effects?

  • Avoid too many reflows (the browser to recalculate everything)
  • Use advanced CSS3 for graphic card rendering
  • Precalculate sizes and positions

Beware of reflows

The reflow appens as many times as there are frames per seconds. It recalculate all positions that change in order to diplay them. Basically, when you scroll you execute a function where you move things between two reflows. But there are functions that triggers reflows such as jQuery offset, scroll... So there are two things to take care about when you dynamically change objects in javascript to avoid too many reflows:

@ryanj
ryanj / discount_upload.php
Created July 25, 2011 22:49
Create N unique Eventbrite discount codes for an event
<?php
// load the API Client library
// https://github.com/ryanjarvinen/eventbrite.php
include "Eventbrite.php";
// -------------- APPLICATION CONFIG ----------------- //
// Eventbrite API key (REQUIRED)
// http://www.eventbrite.com/api/key/
$app_key = 'YOUR_APP_KEY_HERE';
// Eventbrite user_key, required for reading/writing data