Get posts from one category:
http://www.mixmeals.com/wp-json/wp/v2/categories/1
Get posts from one category by slug:
http://www.mixmeals.com/wp-json/wp/v2/categories?slug=lunch
Get posts from multiple categories by slug or id:
Get posts from one category:
http://www.mixmeals.com/wp-json/wp/v2/categories/1
Get posts from one category by slug:
http://www.mixmeals.com/wp-json/wp/v2/categories?slug=lunch
Get posts from multiple categories by slug or id:
"use strict"; | |
// Load plugins | |
const autoprefixer = require("autoprefixer"); | |
const browsersync = require("browser-sync").create(); | |
const cp = require("child_process"); | |
const cssnano = require("cssnano"); | |
const del = require("del"); | |
const eslint = require("gulp-eslint"); | |
const gulp = require("gulp"); |
<?php | |
add_filter( 'the_content', 'crd_append_post_links' ); | |
function crd_append_post_links( $content ) { | |
if ( is_page() ) { | |
$post_links_data = get_post_meta( get_the_ID() ); | |
if ( isset( $post_links_data[ 'blog_group' ][ 0 ] ) ) { | |
$blog_list = maybe_unserialize( $post_links_data[ 'blog_group' ][ 0 ] ); | |
$posts_list = '<ul>'; | |
foreach ( $blog_list as $post_info ) { |
import React from 'react' | |
import { BrowserRouter as Router, Route, Link, Redirect, matchPath } from 'react-router-dom' | |
import { Motion } from 'data-driven-motion' // https://github.com/tkh44/data-driven-motion | |
const WOBBLY_SPRING = { stiffness: 200, damping: 15, precision: 0.1 } | |
const AnimationExample = () => ( | |
<Router> | |
<div> | |
<ul> |
More details - http://blog.gbaman.info/?p=791
For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt
file dtoverlay=dwc2
on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh
in the SD card as well. By default SSH i
gulp.task('css-browsersync', function() { | |
return gulp.src(["*.scss"]) | |
.pipe(sass().on('error', function(err) { | |
console.error(err.message); | |
browserSync.notify(err.message, 3000); // Display error in the browser | |
this.emit('end'); // Prevent gulp from catching the error and exiting the watch process | |
})) | |
.pipe(gulp.dest("public/")) | |
.pipe(browserSync.stream()); | |
}); |
A quick guide on how to setup Node.js development environment.
nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.
<?php | |
add_action( 'rest_api_init', 'myhacks_init' ); | |
function myhacks_init() { | |
register_rest_route( 'myhacks', '/unsecured', array( | |
'methods' => 'GET', | |
'callback' => 'myhacks_response', | |
) ); |
# install dependencies | |
sudo apt-get install libcurl4-openssl-dev libncurses5-dev pkg-config automake yasm git gcc -y | |
# clone cpuminer | |
git clone https://github.com/pooler/cpuminer.git | |
# compile | |
cd cpuminer | |
./autogen.sh | |
./configure CFLAGS="-O3" |