Skip to content

Instantly share code, notes, and snippets.

View thomasmery's full-sized avatar

Thomas Mery thomasmery

  • Aaltomeri
  • Paris
View GitHub Profile
<?php
function media_category_init() {
register_taxonomy( 'media-category', array( 'attachment' ), array(
'hierarchical' => true,
'public' => true,
'show_in_nav_menus' => true,
'show_ui' => true,
'show_admin_column' => true,
'query_var' => true,
@thomasmery
thomasmery / ajaxify-html5.js
Created August 18, 2012 13:35 — forked from balupton/README.md
Ajaxify a Website with the HTML5 History API using History.js, jQuery and ScrollTo
// https://gist.github.com/854622
(function(window,undefined){
// Prepare our Variables
var
History = window.History,
$ = window.jQuery,
document = window.document;
// Check to see if History.js is enabled for our Browser
@thomasmery
thomasmery / php_error_logging.htaccess
Last active December 14, 2015 16:39
.htaccess php error handling - should allow to log and display all errors
# PHP error handling for development servers
php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
php_flag log_errors on
php_flag ignore_repeated_errors off
php_flag ignore_repeated_source off
php_flag report_memleaks on
php_flag track_errors on
php_value docref_root 0
@thomasmery
thomasmery / dabblet.css
Created May 3, 2013 12:17
Flexbox example : flexible header - content takes remaining height and has scroll bar
/**
* Flexbox example : flexible header - content takes remaining height and has scroll bar
*
*/
#page {
position: relative;
display: flex;
background: red;
height: 219px;
@thomasmery
thomasmery / dabblet.css
Created October 26, 2013 09:44
Untitled
#container {
perspective: 800px;
}
#d1 {
position: absolute;
width: 400px;
@thomasmery
thomasmery / wp_twig.php
Last active January 26, 2016 08:25
Twig template engine setup for Wordpress and ACF -
<?php
/**
* Setup Twig Templating : http://twig.sensiolabs.org/
* expects a /templates directory to exist in theme directory
*
* usage with _twig_render wrapper function
* _twig_render($template_path, $data_array);
*
*
**/
@thomasmery
thomasmery / dabblet.css
Last active February 10, 2016 08:34
Untitled
.outer {
position: relative;
background: red;
height: 100%;
display: flex;
flex-direction: column;
align-items: stretch;
overflow: hidden;
@thomasmery
thomasmery / dabblet.css
Created February 10, 2016 08:35
Untitled
.outer {
position: relative;
background: red;
height: 100%;
display: flex;
flex-direction: column;
align-items: stretch;
overflow: hidden;
@thomasmery
thomasmery / dabblet.css
Created February 10, 2016 17:51
Untitled
.outer {
position: relative;
background: red;
height: 100%;
display: flex;
flex-direction: column;
align-items: stretch;
overflow: hidden;
.container {
height: 200px;
background: yellow;
display: flex;
flex-direction: column;
align-items: stretch;
}
.scroll {