Skip to content

Instantly share code, notes, and snippets.

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AE product schema",
"description": "AE product schema",
"type": "object",
"required": [
"title_multi_language_list",
"description_multi_language_list",
"locale",
"product_units_type",
@intco
intco / be_tinyMCE.html5
Created March 28, 2019 09:03
tinyMCE configuration for Contao 4.x - solve [nsbp] problem and set "paste as plain text" as default
<?php
namespace Contao;
if ($GLOBALS['TL_CONFIG']['useRTE']):
?>
<script>window.tinymce || document.write('<script src="<?= $this->asset('js/tinymce.min.js', 'contao-components/tinymce4') ?>">\x3C/script>')</script>
<script>
setTimeout(function() {
@intco
intco / .hgignore
Created March 20, 2019 08:52
Mercurial ignore file (.hgignore) for Contao 4.7
syntax: glob
vendor/**
system/themes/**
web/assets/**
system/tmp/**
var/cache/**
var/logs/**
assets/css/**
assets/js/**
files/mediasite/scss/.sass-cache/**
@font-face {
font-family: 'fontello';
src: url('../font/fontello.eot?74991048');
src: url('../font/fontello.eot?74991048#iefix') format('embedded-opentype'),
url('../font/fontello.svg?74991048#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'fontello';
<?php
/**
* returns dark or light primary color provided the background
*/
function cc($backgroundColor, $dark='black', $light='white') {
return (hexdec($backgroundColor) > 0xffffff/2) ? $dark : $light;
}
echo cc('008000')."\n";
echo cc('FFC0CB')."\n";
@intco
intco / gal_fullsize_div.html
Created May 9, 2014 16:35
Template for Contao 2.11 gallery extension (gallery viewer module)
<div class="layout_fullsize block<?php echo $this->class; ?>">
<div class="cover">
<div class="image_container">
<img src="<?php echo $this->src; ?>"<?php echo $this->imgSize; ?> alt="<?php echo $this->alt; ?>">
</div>
</div>
<div class="gallery_info">
<h2><?php echo $this->title; ?></h2>
<div class="description">
@intco
intco / tl_gsa_structure.php
Last active August 29, 2015 13:57
GSA2 - tl_gsa_structure.php
<?php
# tl_gsa_structure.php
$GLOBALS['TL_DCA']['tl_gsa_structure']['config']['onload_callback'][] = array('tl_gsa_structure_zzzcustom', 'fixPalette');
class tl_gsa_structure_zzzcustom extends Backend {
public function fixPalette($dc) {
<?php
/**
* CsvRow class
*
* @copyright Angelo Galleja
* @license public domain
*
*
* TODO: make exception messages more clear :-O
@intco
intco / ion_auth.sqlite.sql
Created September 2, 2013 06:28
SQL dump of CodeIgniter ion-auth extension for SQLITE database
DROP TABLE IF EXISTS `groups`;
--
-- Table structure for table 'groups'
--
CREATE TABLE `groups` (
`id` integer NOT NULL,
`name` varchar(20) NOT NULL,
`description` varchar(100) NOT NULL,
@intco
intco / windows-tasks.py
Created August 4, 2013 09:02
A taskkill and tasklist wrapper written in python
import os
import subprocess
import StringIO
import csv
def taskKill(imageName):
return runCmd(['taskkill', '/im', imageName])
def taskList(imageName):
(exitcode, stdout, stderr) = runCmd(['tasklist', '/nh', '/fo', 'csv', '/fi', "IMAGENAME eq %s" % imageName])