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
const { PI, cos, sin, abs, sqrt, pow, round, random, atan2 } = Math; | |
const HALF_PI = 0.5 * PI; | |
const TAU = 2 * PI; | |
const TO_RAD = PI / 180; | |
const floor = n => n | 0; | |
const rand = n => n * random(); | |
const randIn = (min, max) => rand(max - min) + min; | |
const randRange = n => n - rand(2 * n); | |
const fadeIn = (t, m) => t / m; | |
const fadeOut = (t, m) => (m - t) / m; |
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
User-agent: * | |
Disallow: /wp-admin/* | |
Disallow: /wp-login.php | |
Disallow: /wp-content/themes/* | |
Disallow: /wp-content/plugins/* | |
Disallow: /trackback | |
Disallow: /cgi-bin | |
Disallow: /users/ |
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
<script type="text/javascript"> | |
let event = new Event('change'); | |
let inputBox = document.querySelector("#shipping_postcode"); | |
const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(inputBox), 'value'); | |
Object.defineProperty(inputBox, 'value', { | |
set: function(t) { | |
if(t === '') return; |
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
let el = Vue.compile(`<MuiIcon icon="${icon}" />`); | |
el = new Vue({ | |
components: { | |
MuiIcon | |
}, | |
vuetify, | |
render: el.render, | |
staticRenderFns: el.staticRenderFns | |
}).$mount(); | |
return el.$el.outerHTML; |
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
<?php | |
/** | |
* @param array $array | |
* | |
* @return array | false | |
*/ | |
function distinct( array $arr ) { | |
if ( is_array( $arr ) ) { |
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
// Add this to nuxt.config.js | |
build: { | |
publicPath: '/zenith/', | |
analyze: false, | |
hotMiddleware : { | |
reload:false | |
}, | |
// watch: ['api', 'modules'], | |
extend(config, {isDev, isClient}) { |
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
const { resolve } = require('path'); | |
module.exports = function() { | |
this.extendRoutes(routes => { | |
routes.push({ | |
name: 'admin', | |
path: '/admin', | |
component: resolve('./pages/index.vue') | |
}) |
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
// Add this file to /middleware | |
export default function ({params, route, redirect}) { | |
if(route.matched.length === 0) { // route is not found, redirect to homepage | |
redirect('302', '/'); | |
} | |
} |
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
<?php | |
$args = array( | |
'object_type' => array( 'hotels' ) | |
); | |
$output = 'names'; // or objects | |
$operator = 'and'; // 'and' or 'or' | |
$taxonomies = get_taxonomies( $args, $output, $operator ); | |
if ( $taxonomies ) { | |
foreach ( $taxonomies as $taxonomy ) { |
NewerOlder