Skip to content

Instantly share code, notes, and snippets.

View smokeyfro's full-sized avatar

Chris Rault smokeyfro

View GitHub Profile
@smokeyfro
smokeyfro / gridsome.server.js
Created March 19, 2020 11:41
Create a collection of books from an array of isbns
const axios = require('axios')
allBooks = [
{
isbn: "9781491997246",
status: "read",
review: "Will be applying this one to my Mzango build soon."
},
{
isbn: "9781484238042",
<tr v-for="(item, i) in filteredProducts" :key="i" :value="item.node.id" class="w-full block odd:bg-white even:bg-gray-200">
(item, i) in cart
const axios = require('axios');
module.exports = async () => {
// Get all books at once using map (or object)
const allReviews = new Map([
/* Work */
// Vue.js: Up and Running
['isbn:9781491997246', { isbn: "9781491997246", short_title: "Vue.js: Up and Running", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }],
// Vue.js in Action
const axios = require('axios');
module.exports = async () => {
// Get all books at once using map (or object)
const allReviews = new Map([
/* Work */
// Vue.js: Up and Running
['isbn:9781491997246', { isbn: "9781491997246", short_title: "Vue.js: Up and Running", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }],
// Vue.js in Action
'use strict';
/**
* Cron config that gives you an opportunity
* to run scheduled jobs.
*
* The cron format consists of:
* [SECOND (optional)] [MINUTE] [HOUR] [DAY OF MONTH] [MONTH OF YEAR] [DAY OF WEEK]
*
* See more details here: https://strapi.io/documentation/3.0.0-beta.x/concepts/configurations.html#cron-tasks
@smokeyfro
smokeyfro / getbooks.js
Created April 3, 2020 07:03
Saved in ./config/functions/getbooks.js
const axios = require('axios');
module.exports = async () => {
// Get all books at once using map (or object)
const allReviews = new Map([
['isbn:9781491997246', { isbn: "9781491997246", short_title: "Vue.js: Up and Running", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }],
['isbn:9781617294624', { isbn: "9781617294624", short_title: "", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }],
['isbn:9781484238042', { isbn: "9781484238042", short_title: "", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }],
['isbn:9781786469946', { isbn: "9781786469946", short_title: "Learning Vue.js 2", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }],
@smokeyfro
smokeyfro / getbooks.js
Created April 3, 2020 07:21
Saved in ./config/functions/getbooks.js
const axios = require('axios');
module.exports = async () => {
// Get all books at once using map (or object)
const allReviews = new Map([
['isbn:9781491997246', { isbn: "9781491997246", short_title: "Vue.js: Up and Running", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }],
['isbn:9781617294624', { isbn: "9781617294624", short_title: "", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }],
['isbn:9781484238042', { isbn: "9781484238042", short_title: "", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }],
['isbn:9781786469946', { isbn: "9781786469946", short_title: "Learning Vue.js 2", status: 0, review: "", category: "work", tags: ["javascript","vue","coding"] }],
'use strict';
/**
* Cron config that gives you an opportunity
* to run scheduled jobs.
*
* The cron format consists of:
* [SECOND (optional)] [MINUTE] [HOUR] [DAY OF MONTH] [MONTH OF YEAR] [DAY OF WEEK]
*
* See more details here: https://strapi.io/documentation/3.0.0-beta.x/concepts/configurations.html#cron-tasks
const axios = require('axios')
const upcomingTuts = [
{
"id": 1,
"title": "Using NPM Modules with Gridsome",
"slug": 1,
"topic": "Gridsome",
"tags": "npm, yarn, modules",
"amount": 150,