Skip to content

Instantly share code, notes, and snippets.

@wochap
Last active August 22, 2016 19:32
Show Gist options
  • Save wochap/4e2013ce8f610f255cfb9097520073a9 to your computer and use it in GitHub Desktop.
Save wochap/4e2013ce8f610f255cfb9097520073a9 to your computer and use it in GitHub Desktop.
windows 10 env config

Recovery

  • create 500mb partition fat32 boot flag

ssd

1. disable hibernation

# open with administrator privileges
$ powercfg -h off
@wochap
Copy link
Author

wochap commented Aug 22, 2016

const faker = require('faker')

faker.locale = 'es'

module.exports = function () {
  let data = { items: [], categories: [] }

  // create categories
  for (let i = 0; i < 10; i++) {
    let title = faker.lorem.word()

    data.categories.push({
      'id': i,
      'slug': faker.helpers.slugify(title),
      'title': title,
      'description': faker.lorem.words(10),
      'imageUrl': 'http://placehold.it/160x160'
    })

    // create items
    for (let j = 0; j < 10; j++) {
      let title = faker.commerce.productName()

      data.items.push({
        'id': j,
        'categoryId': i,
        'slug': faker.helpers.slugify(title),
        'title': title,
        'description': faker.lorem.words(10),
        'imageUrl': 'http://placehold.it/250x180',
        'price': faker.commerce.price(),
        'discount': {
          'flag': faker.random.boolean(),
          'price': faker.commerce.price()
        }
      })
    }
  }
  return data
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment