Skip to content

Instantly share code, notes, and snippets.

View sdeluce's full-sized avatar

Stéphane Deluce sdeluce

View GitHub Profile
@sdeluce
sdeluce / .gitignore
Created October 23, 2016 14:18
Gitignore pour ptojets en C
# Intellij
.idea/
*.iml
*.iws
.idea/*.?ml
# Mac
.DS_Store
# Prerequisites
@sdeluce
sdeluce / test.json
Created September 13, 2015 10:55
import jsfiddle
{
"livres": [
{
"titre": "Les misérables",
"auteur": "Victor Hugo",
"page": 890,
"enstock":true,
"id": 1
},
{
@sdeluce
sdeluce / style.css
Created September 1, 2015 09:18
Lissage Css pour le font Ico
.ico {
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@sdeluce
sdeluce / .zshrc
Created August 25, 2015 08:53
Add Apple Numpad to ZSH terminal
# Keypad
# 0 . Enter
bindkey -s "^[Op" "0"
bindkey -s "^[On" "."
bindkey -s "^[OM" "^M"
# 1 2 3
bindkey -s "^[Oq" "1"
bindkey -s "^[Or" "2"
bindkey -s "^[Os" "3"
# 4 5 6
@sdeluce
sdeluce / Show Hidden File Mac
Created August 4, 2015 16:10
Show Hidden File Mac with terminal
// Show
defaults write com.apple.finder AppleShowAllFiles TRUE;killall Finder
// Hide
defaults write com.apple.finder AppleShowAllFiles FALSE;killall Finder
@sdeluce
sdeluce / Composer with MAMP.md
Created June 27, 2015 09:49
Install Composer on os x with MAMP

##Change default Mac OS X PHP to MAMP's PHP Installation and Install Composer Package Management

###Instructions to Change PHP Installation

First, Lets find out what version of PHP we're running (To find out if it's the default version).

To do that, Within the terminal, Fire this command:

which php

@sdeluce
sdeluce / Add after content WP
Last active August 29, 2015 14:21
Add custom html after the_content in Wordpress
<?php
function insertFootNote($content) {
if(!is_feed() && !is_home()) {
$content.= "<div class='subscribe'>";
$content.= "<h4>Enjoyed this article?</h4>";
$content.= "<p>Subscribe to our <a href='http://feeds2.feedburner.com/WpRecipes'>RSS feed</a> and never miss a recipe!</p>";
$content.= "</div>";
}
return $content;
}
@sdeluce
sdeluce / functions.php
Last active August 29, 2015 14:21 — forked from diije/functions.php
<?php
/**
* Usage:
* Paste a gist link into a blog post or page and it will be embedded eg:
* https://gist.github.com/diije/5805069
*
* If a gist has multiple files you can select one using a url in the following format:
* https://gist.github.com/diije/5805069?file=embed-gist.php
*/
@sdeluce
sdeluce / class.php
Last active November 8, 2021 19:07 — forked from hlashbrooke/class.php
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
class WordPress_Plugin_Template_Settings {
private $dir;
private $file;
private $assets_dir;
private $assets_url;
private $settings_base;
@sdeluce
sdeluce / functions.php
Created January 16, 2015 17:05
Afficher l'ID d'un post ou d'une page hors de la boucle Wordpress
<?php
global $wp_query;
$postid = $wp_query->post->ID;
echo get_post_meta($postid, 'Your-Custom-Field', true);
wp_reset_query();
?>