Skip to content

Instantly share code, notes, and snippets.

View sutter's full-sized avatar
Available for freelance work

Sutterlity Laurent sutter

Available for freelance work
View GitHub Profile
@sutter
sutter / Sublime-preference.json
Last active December 17, 2015 09:59
Personal Sublime Text 3 Preference
{
"auto_complete": true,
"auto_indent": true,
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
@sutter
sutter / custom-link-post.php
Created June 6, 2013 13:36
Custom next & prev post link
// Add custom class to link NEXT & PREV
function popy_add_class_next_post_link($html){
$html = str_replace('<a','<a class="icon-next"',$html);
return $html;
}
add_filter('next_post_link','popy_add_class_next_post_link',10,1);
function popy_add_class_previous_post_link($html){
$html = str_replace('<a','<a class="icon-prev"',$html);
return $html;
@sutter
sutter / Custom-post-type.php
Created June 26, 2013 11:34
Custom Post Type
// Custom post type
function codex_custom_init() {
$labels = array(
'name' => 'Projets',
'singular_name' => 'Projet',
'add_new' => 'Ajouter',
'add_new_item' => 'Ajouter un projet',
'edit_item' => 'Editer le projet',
'new_item' => 'Nouveau projet',
'all_items' => 'Tout les projets',
.wrapper {
max-width: 940px;
min-width: 768px;
margin-left: auto;
margin-right: auto;
}
.row {
margin-left: -2.12766%;
}
@sutter
sutter / Set-to-same-height.js
Created July 25, 2013 08:32
Set to same height
function setToSameHeight(elementBase, element){
$(window).load(function() {
elementBaseHeight = $(elementBase).height();
element = $(element);
$(element).css('height', elementBaseHeight);
});
$(window).resize(function() {
elementBaseHeight = $(elementBase).height();
element = $(element);
$(element).css('height', 'auto');
$("p").click(function () {
$(this).toggleClass("highlight");
});
@sutter
sutter / jQuery.js
Created September 5, 2013 08:46
jQuery 2 and fallback for jQuery 1.9
<!--[if lte IE 8]>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="assets/js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
<![endif]-->
<!--[if gt IE 8]><!-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="assets/js/vendor/jquery-2.0.3.min.js"><\/script>')</script>
<!--<![endif]-->
@sutter
sutter / Preferences.json
Created September 8, 2013 21:31
Sublime Text 2 Personal preferences settings
{
"default_encoding": "UTF-8",
"font_face": "Inconsolata",
"font_size": 16.0,
"tab_size": 4,
"theme": "Flatland Dark.sublime-theme",
"color_scheme": "Packages/Theme - Flatland/Flatland Monokai.tmTheme",
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"auto_complete": true,
@sutter
sutter / A-Pen-by-Sutterlity.markdown
Created October 15, 2013 16:17
A Pen by Sutterlity.
@sutter
sutter / Gruntfile.js
Last active January 4, 2016 02:59
1 - Exercice Grunt
module.exports = function(grunt) {
// Charge toutes les tâches de Grunt
require('load-grunt-tasks')(grunt);
// Configuration de Grunt
grunt.initConfig({})
// Définition des tâches Grunt
grunt.registerTask('default', '')