This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getClosestStackingContext( node ) { | |
if( ! node || node.nodeName === 'HTML' ) { | |
console.log( node, 'has stacking context, reason: root' ); | |
return document.documentElement; | |
} | |
const computedStyle = getComputedStyle( node ); | |
if ( computedStyle.position === 'fixed' ) { | |
console.log( node, 'has stacking context, reason: position: fixed' ); | |
return node; | |
} else if ( computedStyle.zIndex !== 'auto' && computedStyle.position !== 'static' ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let Thing = (props) => ( | |
<div>look {props.name}! no state!</div> | |
) | |
render(<Thing name="Ma"/>, el) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Logs | |
logs | |
*.log | |
# Runtime data | |
pids | |
*.pid | |
*.seed | |
# Directory for instrumented libs generated by jscoverage/JSCover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :application, 'my_app_name' | |
set :repo_url, '[email protected]:me/my_repo.git' | |
set :branch, :master | |
set :deploy_to, -> { "/srv/www/#{fetch(:application)}" } | |
set :log_level, :info | |
set :linked_files, fetch(:linked_files, []).push('.env') | |
set :linked_dirs, fetch(:linked_dirs, []).push('web/app/uploads') | |
namespace :deploy do | |
desc 'Restart application' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: WP_Rewrite endpoints demo | |
Description: A plugin giving example usage of the WP_Rewrite endpoint API | |
Plugin URI: http://make.wordpress.org/plugins/2012/06/07/rewrite-endpoints-api/ | |
Author: Jon Cave | |
Author URI: http://joncave.co.uk/ | |
*/ | |
function makeplugins_endpoints_add_endpoint() { |