Skip to content

Instantly share code, notes, and snippets.

View pixeline's full-sized avatar
😄
Heaven, I'm in heaven, And my heart beats so that I can hardly speak !

Alexandre Plennevaux pixeline

😄
Heaven, I'm in heaven, And my heart beats so that I can hardly speak !
View GitHub Profile

Contract Killer 3 (french version)

Date de Révision: 07/11/2012

Entre nous [la raison sociale de votre entreprise] et vous [la raison sociale de votre client]

Résumé:

Nous ferons toujours de notre mieux pour répondre à vos besoins et à vos attentes, mais il est important pour nous comme pour vous d’avoir une trace écrite des tenants et aboutissants de notre relation, et des éventualités en cas d’un quelconque désaccord. Vous ne trouverez ni termes légaux complexes, ni longs passages interminables et incompréhensibles dans ce contrat. Nous n’avons aucune volonté de vous piéger en vous faisant signer quoi que ce soit que vous seriez amené ensuite à regretter. Nous voulons juste ce qu’il y a de mieux pour les deux parties, maintenant et dans le futur.

@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

@pixeline
pixeline / _sassy_link_underlines.md
Last active June 11, 2016 14:57 — forked from jimmynotjim/_sassy_link_underlines.md
Sassy Link Underlines
@ericakfranz
ericakfranz / functions.php
Created April 19, 2015 23:00
Filter WP SEO's OpenGraph and Twitter image meta tags
<?php
/**
* Return 'medium' image for mobile devices since that is what we're
* loading to display as the featured image on each post.
*/
//* Filter WP SEO's OpenGraph image output
add_filter('wpseo_opengraph_image_size', 'disi_opengraph_image_size');
function disi_opengraph_image_size($val) {
if( wp_is_mobile() ) {
@gchtr
gchtr / Acf_Current_Tab.php
Last active January 25, 2017 17:10
WordPress + ACF: Keep the last edited tab selection when post refreshes
<?php
// Drop this into your functions.php
/**
* ACF: Keep the last edited tab selection when post refreshes.
*
* When a post containing ACF tabs is opened for edits, the currently selected tab
* will be saved in a transient. Upon save or refresh of the page, the last selected
* tab will be selected again, making it more convenient to work with ACF tabs.
@mattboon
mattboon / gist:1275191
Created October 10, 2011 12:32
WordPress - Query Custom Post Type and taxonomy term by ID
<?php
// gets the ID from a custom field to show posts on a specific page
$buildType = get_post_meta($post->ID, 'build_type_id', true);
// run query
query_posts(array(
'post_type' => 'portfolio',
'showposts' => -1,
'tax_query' => array(
array(
@pixeline
pixeline / functions.php
Last active January 23, 2018 12:45
Function to prevent orphans in WordPress post titles. It simply replaces the last space after the penultimate word of a title by a non-breaking space. Pfew.
function add_nonbreaking_space_to_text($title, $id = null){
$title = explode(' ', $title);
$length = count($title);
if( $length >0){
$title[ $length-2 ] .= "&nbsp;" . $title[ $length-1 ];
array_pop($title);
}
return implode(" ", $title);
}
@pixeline
pixeline / siege-urls.php
Last active January 23, 2018 12:45
WP-siege: Generates list of all published URLs from a Wordpress site, for use with Siege.
<?php
/*
*
* WP-siege: Generates list of all published URLs from a Wordpress site, for use with Siege.
* Author: Alexandre Plennevaux alexandre@pixeline.be
*
*/
//path to a wp-load file
include( './wp-load.php' );
@pixeline
pixeline / purge.php
Last active January 23, 2018 12:45
Clears serverside caches (finetuned for wordpress on gandi.net simplehosting instances): Varnish, APC, WP Transients, WP Super Cache, W3 Total Cache
<?php
/* purge.php
* Clears serverside caches (finetuned for wordpress on gandi.net simplehosting instances): Varnish, APC, WP Transients, WP Super Cache, W3 Total Cache
*/
header("Cache-Control: max-age=1"); // don't cache ourself
error_reporting(E_ALL);
ini_set("display_errors", 1);
@pixeline
pixeline / functions.php
Last active January 23, 2018 12:46
Optimized Wordpress "pre_get_posts" boilerplate
<?php
// In your theme's functions.php file.
add_action( 'pre_get_posts', 'alter_the_main_query' );
function alter_the_main_query( $wp_query ){
if(is_admin() || !$wp_query->is_main_query()){
// pre_get_posts is launched on ALL requests. So we get out early if this is a wp-admin url request or if this is not the main query.
return;
}