Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Mery thomasmery

  • Aaltomeri
  • Paris
View GitHub Profile
View dabblet.css
#root {
position: relative;
height: 200px;
background: blue;
}
#root::before {
content: "";
position: absolute;
left: 20px;
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@thomasmery
thomasmery / custom_row_renderer.jsx
Last active Jun 14, 2021
Adding props to a React Virtualized custom row renderer
View custom_row_renderer.jsx
/**
* External dependencies
*/
import React, { PureComponent, PropTypes } from 'react';
import { AutoSizer, Table } from 'react-virtualized';
/**
* Internal dependencies
**/
import getDefaultColumns from './columns'; // some columns for RV Table
View dabblet.css
.container {
height: 200px;
background: yellow;
display: flex;
flex-direction: column;
align-items: stretch;
}
.scroll {
View dabblet.css
.outer {
position: relative;
background: red;
height: 100%;
display: flex;
flex-direction: column;
align-items: stretch;
overflow: hidden;
View dabblet.css
.outer {
position: relative;
background: red;
height: 100%;
display: flex;
flex-direction: column;
align-items: stretch;
overflow: hidden;
View dabblet.css
.outer {
position: relative;
background: red;
height: 100%;
display: flex;
flex-direction: column;
align-items: stretch;
overflow: hidden;
@thomasmery
thomasmery / wp_twig.php
Last active Jan 26, 2016
Twig template engine setup for Wordpress and ACF -
View wp_twig.php
<?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);
*
*
**/
View Media category for Wordpress
<?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,
View Visual Composer Extension
<?php
/*
Extends Visual Composer
More information can be found here: http://kb.wpbakery.com/index.php?title=Category:Visual_Composer
*/
// don't load directly