Skip to content

Instantly share code, notes, and snippets.

@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',
{namespace cr = Tx_Catalogueraisonee_ViewHelpers}
<f:if condition="{entries}">
<f:then>
<f:for each="{entries}" as="entry" iteration="iterator">
<cr:alphabet string="{entry.title}" length="1" />
<f:if condition="{iterator.isFirst}">
<?php
/***************************************************************
* Copyright notice
*
* (c) 2012 Torsten Schrade <Torsten.Schrade@adwmainz.de>
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
@ichabodcole
ichabodcole / Web Audio API - Sound Fading
Created July 3, 2013 18:40
Reference for fading in and out sounds with the Web Audio API
fadeTo: (value, fadeLength)->
fadeLength = fadeLength || @defaultfadeLength
currentTime = @ctx.currentTime
#time the fade should complete
fadeTime = currentTime + fadeLength
#set the start time
@masterGain.gain.setValueAtTime(@userVolume, currentTime)
@masterGain.gain.linearRampToValueAtTime(value, fadeTime)
fadeOut: (fadeLength)->
@dmitryd
dmitryd / checkboxes.txt
Created July 10, 2013 08:16
This example shows how to use the 'split' TypoScript function to create a set of checkboxes easily. There are three files total: general code, stdWrap helper and usage example.
temp.checkbox_with_split = COA
temp.checkbox_with_split {
# Define data
10 = LOAD_REGISTER
10 {
# Valid bits in the field
bits = 1,2,3,4,5,6,7
# Field name in the database. Don't move below other registers!
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3DataStructure>
<meta type="array">
<langDisable>1</langDisable>
</meta>
<sheets>
<general>
<ROOT type="array">
<TCEforms>
<sheetTitle>Einstellungen</sheetTitle>
// create the audio context (chrome only for now)
var context = new webkitAudioContext();
var audioBuffer;
var sourceNode;
var analyser;
var javascriptNode;
// get the context from the canvas to draw on
var ctx = $("#canvas").get()[0].getContext("2d");
@fregante
fregante / TimelineLite.addDelay.js
Last active December 24, 2018 11:53
Method to add delays at any position in Greensocks TimelineLite and TimelineMax (Javascript GSAP)
/**
* Add a delay at the end of the timeline (or at any label)
* @param {number} delay Seconds to wait
* @param {string} position Label name where to start the delay
*
* Usage: tl.addDelay(4); //easy!
*/
TimelineLite.prototype.addDelay = function (delay, position) {
var delayAttr;
if(typeof delay === 'undefined' || isNaN(delay)){
@jasny
jasny / bootstrap-em.less
Last active January 5, 2020 15:36
Use em or rem font-size in Bootstrap 3
/**
* Use em or rem font-size in Bootstrap 3
*/
@font-size-root: 14px;
@font-unit: 0rem; // Pick em or rem here
// Convert all variables to em
@joshcarr
joshcarr / soundwaves.js
Created May 1, 2014 23:16
Creating sound waves with JavaScript
// Creating sound waves with JavaScript
// from http://js.do/blog/sound-waves-with-javascript/
var samples = []
//
//
//
// Achord