- install dnsmasq
$ brew install dnsmasq
...
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
- edit
/usr/local/etc/dnsmasq.conf
address=/local/127.0.0.1
add_filter( 'pre_get_posts', 'my_get_posts' ); | |
function my_get_posts( $query ) { | |
if ( is_home() && $query->is_main_query() ) { | |
$query->set( 'post_type', array( 'post', 'custom_post_name' ) ); | |
$query->set( 'order', 'ASC'); | |
$query->set( 'posts_per_page', 3); | |
} |
<?php | |
get_header(); ?> | |
<div id="primary" class="content-area"> | |
<main id="main" class="site-main" role="main"> | |
<div class="cpt__filter wrapper"> | |
<?php | |
$custom_type = 'cpt_slug'; |
/////////////////////////////// | |
//Smooooth scrolling | |
//////////////// | |
var root = jQuery('html, body'); | |
jQuery('.menu li a').click(function() { | |
var href = jQuery.attr(this, 'href'); | |
var offset = jQuery(href).offset(); | |
var scrollto = offset.top - 100; // 100 here is the offsetb needed bacause of top sticky nav | |
root.animate({ |
$ brew install dnsmasq
...
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
/usr/local/etc/dnsmasq.conf
address=/local/127.0.0.1
var number = 12345.543; | |
number.toLocaleString('en') |
function calculateDepreciation(startPrice, years) { | |
for (i = 1; i <= years; i++) { | |
const result = startPrice * Math.pow((1 - 14/100), i); | |
console.log(Math.round(result).toLocaleString('en')) | |
} | |
} | |
calculateDepreciation(29000, 5) |
//The fp() “Fluid Property” function | |
export function fp(property, min, max, start = 320, end = 1400, clip = true, clipAtStart = true, clipAtEnd = true) { | |
const multiplier = (max - min) / (end - start) * 100; | |
const adder = (min * end - max * start) / (end - start); | |
const formula = `calc((${multiplier}vw) + (${adder}px))`; | |
return` | |
@media (max-width: ${start}px) { | |
${property}: ${min}px; | |
} |
img { | |
object-fit: cover; | |
} |
git reset --keep HEAD@{1} |
//The fp() “Fluid Property” SCSS mixin | |
export function fp(property, min, max, start = 320, end = 1400, clip = true, clipAtStart = true, clipAtEnd = true) { | |
const multiplier = (max - min) / (end - start) * 100; | |
const adder = (min * end - max * start) / (end - start); | |
const formula = `calc((${multiplier}vw) + (${adder}px))`; | |
return` | |
@media (max-width: ${start}px) { | |
${property}: ${min}px; | |
} |