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

Website Contract [month] [year]

Description of this Contract

This contract is not meant to trick or deceive you; the intention is purely to protect both parties. I have tried to keep the wording as plain as possible, but if anything is unclear, please let me know and I will be more than happy to clarify it with you. Also, until you sign it, please feel free to request to change bits of it to suit your requirements.

In short, [client name] is contracting me, [my name], to [description of my role] between [start date and finish date].

By signing this, you are confirming that you have the power and ability to enter into this contract on behalf of [client's company].

@jeromecoupe
jeromecoupe / Media Query Mixin in SASS
Last active March 26, 2022 20:53
Easy Media Queries and Breakpoints in SASS
/*------------------------------------
$MEDIA QUERIES
------------------------------------*/
/*
- small: 600px 37.5em
- medium: 760px 47.5em
- large: 1024px 64em
- xlarge: 1260px 78.75em
*/
@jeromecoupe
jeromecoupe / Blocking li in #eecms
Last active December 19, 2015 09:39
Block </li></li> together with ExpressionEngine when using inline-block (avoid whitespace bug)
{!-- List last 3 news (blocking the <li></li> together is mandatory due to using inline-block) --}
{exp:channel:entries channel="news" disable="categories|category_fields|member_data|pagination|trackbacks" status="open" orderby="date" sort="desc" dynamic="no" limit="3"}
{if count == 1}<ul><li>{/if}
<article>
<h3><a href="{url_title_path='news-press/index'}">{title}</a></h3>
<p>{exp:eehive_hacksaw words="30" append="&hellip;"}{cf_news_summary}{/exp:eehive_hacksaw}</p>
</article>
{if count == total_results}</li></ul>{if:else}</li><li>{/if}
// ---
// Sass (v3.2.9)
// ---
@mixin respond-to($queries...) {
$length: length($queries);
@for $i from 1 through $length{
@if $i % 2 == 1 {
@media screen and (min-width: nth($queries, $i)) {
@jeromecoupe
jeromecoupe / craftcms .gitignore
Last active September 21, 2020 10:38
craftcms .gitignore (craft 3)
# Craft
# --------------------------
/.env
/vendor/
# files generated by build process
/web/dist/
# user uplodaded files
/web/uploads/
# DB Dumps
@jeromecoupe
jeromecoupe / eecms safecracker
Created December 20, 2012 20:51
safecrachker and .htacess interactions
1. don't use these rules in your .htaccess if using the exclude method, they prevent safecracker forms from submitting properly. Sorry I forgot about thios.
# Add a trailing slash to paths without an extension
# -------------------------------------------------
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule ^(.*)$ $1/ [L,R=301]
OR add a rule not to add a trailing slash for POST requests
@jeromecoupe
jeromecoupe / gist:3880163
Created October 12, 2012 16:40
Custom pagination with {exp:stash:get_list} and filtering
{!-- Wrapper template --}
{embed="wrappers/page_full_width"}
{!-- Meta data --}
{exp:stash:set name="meta_title"}Our projects{/exp:stash:set}
{exp:stash:set name="meta_description"}Projects of the International Polar Foundation{/exp:stash:set}
{!-- Navigation --}
{exp:stash:set name="nav_current"}projects{/exp:stash:set}
@jeromecoupe
jeromecoupe / gist:3436758
Created August 23, 2012 13:47
exp:ifelse and playa conditionals
<!--
Using this code in an embed, passing the father entry_id as {embed:myentryid}
This works natively but as soon as I add ifelse, it breaks
Could stash value of playa conditionals but rather avoid it if possible
Have tried multiple ways of quoting things
{if "{exp:playa:total_children entry_id='{embed:myentryid}' channel='projects|news|pressreleases|documents' status='open'}" != "0"}
{if {exp:playa:total_children entry_id="{embed:myentryid}" channel="projects|news|pressreleases|documents" status="open"}}
@jeromecoupe
jeromecoupe / gist:3426115
Last active October 9, 2015 02:47
Sublime Text 2 User Config
{
"theme": "Soda Dark.sublime-theme",
"bold_folder_labels": true,
"highlight_modified_tabs": true,
"soda_classic_tabs": true,
"highlight_modified_tabs": true,
"color_scheme": "Packages/User/themes/Monokai.tmTheme",
"font_face": "Inconsolata",
"font_size": 17,
@jeromecoupe
jeromecoupe / use switch to open and close divs
Last active October 5, 2015 20:08
ExpressionEngine: Insert a <div> every x rows within a loop without PHP
{exp:channel:entries channel="news"}
{if '{switch="one|two|three"}' == "one"}<div class="row">{/if}
... something ...
{if '{switch="one|two|three"}' == "three" || count == total_results}</div>{/if}
{/exp:channel:entries}