I hereby claim:
- I am johnie on github.
- I am johnie (https://keybase.io/johnie) on keybase.
- I have a public key whose fingerprint is A42B C411 5BAC 7FE1 5728 150A A84A 4594 6E00 E128
To claim this, I am signing this object:
/*----------------------------------------------------------*\ | |
Setting up express and nunjucks with custom views folder | |
\*----------------------------------------------------------*/ | |
var express = require('express'); | |
var app = express(); | |
var nunjucks = require('nunjucks'); | |
var path = require('path'); |
function _getComputedStyle(element){ | |
var style, | |
_element = element; | |
while(_element && _element.nodeType !== 1){ | |
_element = _element.parentNode; | |
} | |
style = _element && _element.nodeType == 1 ? window.getComputedStyle(_element) : null; | |
return style; |
I hereby claim:
To claim this, I am signing this object:
<div class="bottom" style="text-align: right;"> | |
<div class="flexible-layouts__btn-wrap"> | |
<div class="flexible-layouts papi-hide"> | |
<div class="flexible-layouts-arrow"></div> | |
<ul> | |
<?php foreach ( $items as $layout ): ?> | |
<li data-papi-json="<?php echo $options->slug; ?>_<?php echo $layout['slug']; ?>_flexible_json"><?php echo $layout['title']; ?></li> | |
<?php endforeach; ?> | |
</ul> |
<?php | |
$wp_customize->add_control( new WP_Customize_Latest_Post_Control( $wp_customize, 'latest_post_control', array( | |
'label' => __( 'Select A Featured Post', 'mytheme' ), | |
'section' => 'header_section', | |
'settings' => 'featured_post', | |
'post_type' => 'page' | |
))); |
<?php | |
add_action( 'wp_ajax_button_click', 'user_clicked' ); | |
function user_clicked() { | |
update_user_meta( get_current_user_id(), 'clicked_link', 'yes' ); | |
wp_redirect( $_SERVER['HTTP_REFERER'] ); | |
exit(); | |
} |
<?php | |
/** | |
* Force enable a plugin. | |
* | |
* @param array $plugins | |
* | |
* @return array | |
*/ | |
add_filter( 'option_active_plugins', function ( $plugins ) { |
/** | |
* Finds last working/business day of the month. | |
* | |
* Not tested for cross-browser compability. Works in Node.js though. | |
* | |
* EXAMPLES: | |
* | |
* 1. Returns last day of the last month of the current year: | |
* | |
* var result = lastBusinessDayOfMonth(); |
<?php | |
/** | |
* Make Curl call. | |
* | |
* @param string $url URL to curl | |
* @param string $method GET or POST, Default GET | |
* @param mixed $data Data to post, Default false | |
* @param mixed $headers Additional headers, example: array ("Accept: application/json") | |
* @param bool $returnInfo Whether or not to retrieve curl_getinfo() |
#!/bin/bash | |
# Uninstall Script | |
if [ "${USER}" != "root" ]; then | |
echo "$0 must be run as root!" | |
exit 2 | |
fi | |
while true; do |