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
@mildlygeeky
mildlygeeky / gist:14b814ec8c815a1f5c6f
Last active January 3, 2019 11:43
Dynamic Navigation using native Craft CMS and Twig templates
{# For this, I wanted the nav to show the top-level node and second-level nodes #}
{# when on level 1, and then show the second-level and its children when on #}
{# level 2 or level 3 (so we get good parent, child, and sibling navigation. #}
{# Requires string 'sectionName' to be passed with Structure section name #}
{% if entry.showLeftNavigation %}
<nav class="interior-page__nav">
@micahgodbolt
micahgodbolt / SassMeister-input.scss
Created June 24, 2013 16:08
Another stab at Filament Group's Element Query challenge.
// ---
// 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)) {
@davist11
davist11 / ext.php
Last active December 16, 2015 22:09
EE Entry previewing
<?php
public function sessions_end($session)
{
if ($session->userdata['can_access_cp'] === 'y') {
$new_global_vars['gv_can_preview'] = TRUE;
} else {
$new_global_vars['gv_can_preview'] = FALSE;
}
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@airways
airways / mod.extendedchannel.php
Created October 28, 2011 15:52
ExpressionEngine: Extending a core or third party module or plugin
<?php
class ExtendedChannel {
public __construct()
{
$this->EE = &get_instance();
}
public function extended_entries()
{