Skip to content

Instantly share code, notes, and snippets.

View jeromecoupe's full-sized avatar
💭
coding away

Jérôme Coupé jeromecoupe

💭
coding away
View GitHub Profile
@jeromecoupe
jeromecoupe / craft_matrix_events_lowblocks.twig
Last active June 1, 2016 12:47
Implement an event calendar with Matrix: all event occurrences are stored as matrix blocks / fields
{% extends "_layouts/default" %}
{% block content %}
{#
Events just have a Matrix fields with multiple dates.
The goal is to get all dates within a certain date range, ordered by date asc
All event details should be repeated when an event occurs at multiple dates
Events are presented in a calendar view and should only appear for a given day if they have
a corresponding occurence on that day.
@jeromecoupe
jeromecoupe / test_dates_matrix_native.twig
Last active May 26, 2016 10:39
Discontinuous events with multiple dates: native method with date fields and matrix
{% extends "_layouts/default" %}
{% block content %}
{#
Tackling discontinuous events without duplication
- Each event has a 'startDate' and an 'endDate' (those are just a date interval, the first date corresponds the the first occurrence of the event and the mast one corresponds to the last occurence of the events). This matching is done manually but we could also use the preparse plugin.
- Each event has got a matrix field 'timetable' with just a block 'mxBlockDate' and date field 'mxDate' for each occurence of the event
@jeromecoupe
jeromecoupe / test_dates_matrix.twig
Last active May 26, 2016 10:40
Handling discontinuous events with just Matrix dates (plugins)
{% extends "_layouts/default" %}
{% block content %}
{#
I have to build an event heavy website
1. Events can have one or more dates
Duplicating events for multiple dates makes no sense
@jeromecoupe
jeromecoupe / base_creative_meeting_plan.md
Last active May 10, 2016 14:11
Outline for the Creative Meeting introduction @ Base Design - May 11, 2016

Communicating design in a digital environment

Before getting into the matter, I wanted to set the stage. We are essentially going to talk about three things today.

  1. The context of digital design
  2. Problematic static design deliverables
  3. Design deliverables and the current digital workflow

The context: dealing with unknown unknowns

@jeromecoupe
jeromecoupe / gist:cbac5f271fea0939fa88
Last active August 29, 2015 14:05
Trouble figuring out stash caching / parse order
{!--
I have a complex template, fully cached.
The only thing I don't want to cache is a list of random testimonials
that has to change every time the page is loaded.
***
Some things I would like to understand, pretty please
@jeromecoupe
jeromecoupe / stash caching and escape enmbed
Last active August 29, 2015 14:00
Cache an entire page but escape an embed used for relationships (in case one of the related entry changes or some are removed / added)
{!-- Stash page caching https://github.com/croxton/Stash/wiki/Caching --}
{exp:stash:cache bundle="news"}
{!-- layout used --}
{stash:embed name="layouts:page"}
{exp:channel:entries
channel="news"
status="open"
disable="member_data|pagination"
@jeromecoupe
jeromecoupe / gulpfile.js
Last active January 4, 2016 20:49
Simple gulpfile: do not use gulp.run > deprecated soon
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
concat = require('gulp-concat'),
notify = require('gulp-notify'),
minifycss = require('gulp-minify-css');
@jeromecoupe
jeromecoupe / eecms_database.php
Created December 2, 2013 02:31
Standard database.php for ExpressionEngine
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require "config.php";
/* End of file database.php */
/* Location: ./system/expressionengine/config/database.php */
@jeromecoupe
jeromecoupe / eecms_admin.php
Last active December 29, 2015 23:39
Standard admin.php for ExpressionEngine
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| ExpressionEngine Config Items
|--------------------------------------------------------------------------
|
| The following items are for use with ExpressionEngine. The rest of
| the config items are for use with CodeIgniter.
|
@jeromecoupe
jeromecoupe / eecms_htaccess
Created December 2, 2013 02:02
My .htaccess for ExpressionEngine
# Standard .htaccess file
# -------------------------------------------------
# -------------------------------------------------
# Secure .htaccess file
# -------------------------------------------------
<Files .htaccess>
order allow,deny
deny from all
</Files>