This file contains hidden or 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
{ | |
"name": "company/wp-unit-tests", | |
"type": "wordpress-plugin", | |
"require": { | |
"phpunit/phpunit": "~5.0.6" | |
}, | |
"autoload": { | |
"psr-4": {"company\\Tests\\": "src/"}, | |
"files": ["src/functions.php"] | |
} |
This file contains hidden or 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
EB_SCRIPT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k script_dir) | |
EB_APP_STAGING_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k app_staging_dir) | |
EB_APP_USER=$(/opt/elasticbeanstalk/bin/get-config container -k app_user) | |
EB_SUPPORT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k support_dir) |
This file contains hidden or 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
RewriteEngine On | |
RewriteBase / | |
RewriteRule .* - [E=INFO_API_VERSION:%{API_VERSION},NE] | |
RewriteRule .* - [E=INFO_AUTH_TYPE:%{AUTH_TYPE},NE] | |
RewriteRule .* - [E=INFO_CONTENT_LENGTH:%{CONTENT_LENGTH},NE] | |
RewriteRule .* - [E=INFO_CONTENT_TYPE:%{CONTENT_TYPE},NE] | |
RewriteRule .* - [E=INFO_DOCUMENT_ROOT:%{DOCUMENT_ROOT},NE] | |
RewriteRule .* - [E=INFO_GATEWAY_INTERFACE:%{GATEWAY_INTERFACE},NE] | |
RewriteRule .* - [E=INFO_HTTPS:%{HTTPS},NE] | |
RewriteRule .* - [E=INFO_HTTP_ACCEPT:%{HTTP_ACCEPT},NE] |
This file contains hidden or 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
// This action should be inside add_actions | |
/** | |
* Remove Gravityforms captcha action | |
* This is a fix to prevent interferences from commonLib.js | |
*/ | |
add_action('get_footer', function(){ | |
global $wp_filter; | |
foreach($wp_filter['wp_footer']->callbacks as $priority => $hooks){ | |
foreach($hooks as $k => $hook){ |
This file contains hidden or 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
#!/usr/bin/env python | |
numbers = [16, 17, 4, 3, 5, 2] | |
leaders = [] | |
for i, n in enumerate(numbers): | |
remaining = numbers[i+1:] | |
if len(remaining) == 0 or n > max(remaining): | |
leaders.append(n) |
OlderNewer