Skip to content

Instantly share code, notes, and snippets.

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
View Good bye promo1.md

Voilà. C'est quasi fini. 25 avril --> 27 octobre 2017

185 jours
15.984.000 secondes
266.400 minutes
4440 heures
26 semaines et 3 jours.

Vous avez été la première promo de BeCode.

View WordPress .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
@pixeline
pixeline / php_upgrade_to_71.sh
Last active Jul 30, 2022
Update Mac Os X's php version to php 7.1 using homebrew. Includes curl and mcrypt
View php_upgrade_to_71.sh
# 1. Install brew --> http://brew.sh/
# 2. run the following commands in your Terminal
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install --with-openssl curl
brew install --with-homebrew-curl --with-apache php71
brew install php71-mcrypt php71-imagick
# 3. Follow these instructions to make Apache and php-cli use the newer php executable and make the change persist after reboot.
brew info php71
@pixeline
pixeline / functions.php
Last active Jan 23, 2018
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.
View functions.php
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 / class-popular-posts-data.php
Last active Jan 23, 2018
An interface to the wordpress-popular-posts WordPress plugin that returns the raw data.
View class-popular-posts-data.php
@pixeline
pixeline / class-wp-numeric-pagination.php
Last active Apr 8, 2020
Wordpress Numeric Pagination Class that enables you to set the classes of each LI and A html tag.
View class-wp-numeric-pagination.php
<?php
/**
* Numeric Pagination Class
* @author Alexandre Plennevaux https://pixeline.be
*
* This class returns a list of LI > A. It is up to you to set the wrapping NAV > UL around your function call.
*
* @usage (setting specific classes)
*
* // Sets the css classes you want to be used for the output
@pixeline
pixeline / siege-urls.php
Last active Jan 23, 2018
WP-siege: Generates list of all published URLs from a Wordpress site, for use with Siege.
View siege-urls.php
<?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' );
View the-voice.scss
/* ----------------------------------------------
THE VOICE
// this class set is used to convey specific expressions in a coherent, global system: the voice of your application.
---------------------------------------------- */
.voice{
font-size:100%;
font-family: $font-sans;
&--info{
background-color:#FFFFDD;
View _sassy_link_underlines.md
@pixeline
pixeline / _underline.scss
Last active Jul 6, 2016 — forked from jamesmusgrave/_smart-underline.scss
Smart Underline Sass Mixin
View _underline.scss
// dev note: make sure to use an autoprefixer...
@mixin underline($background: #fff, $text: #000, $selection: #ffc, $position: 86%){
color: inherit;
text-decoration: none;
background: linear-gradient($background, $background), linear-gradient($background, $background), linear-gradient($text, $text);
background-size: .05em 1px, .05em 1px, 1px 1px;
background-repeat: no-repeat, no-repeat, repeat-x;
text-shadow: 0.03em 0 $background, -0.03em 0 $background, 0 0.03em $background, 0 -0.03em $background, 0.06em 0 $background, -0.06em 0 $background, 0.09em 0 $background, -0.09em 0 $background, 0.12em 0 $background, -0.12em 0 $background, 0.15em 0 $background, -0.15em 0 $background;
background-position-y: $position,$position, $position;