<filename>src/server/seeders/20170909211842-kommandr.js
'use strict';

module.exports = {
  up: function (queryInterface, Sequelize) {
    return queryInterface.bulkInsert('Kommandrs', [
      {
        id: 1,
        hashId: 'aMAk21',
        userId: 1,
        title: 'Reset last commit',
        description: 'This command resets the last commit in your local repo',
        cli: 'git reset HEAD~',
        createdAt: new Date(),
        updatedAt: new Date(),
        totalViews: 12,
        totalStars: 1,
        totalForks: 1,
        totalComments:41,
      },
      {
        id: 2,
        hashId: 'mZIwqm1',
        userId: 1,
        title: 'Start apache service',
        description: 'Run this command to start the apache http server',
        cli: 'service apache2 start',
        createdAt: new Date(),
        updatedAt: new Date(),
        totalViews: 120,
        totalStars: 7,
      },
      {
        id: 3,
        hashId: 'XbAquI2',
        title: 'Backup all databases MySQL',
        userId: 0,
        description: 'Run this command to backup all databases',
        cli: 'mysqldump --datadir=/path/to/datadir --user=test --all-databases',
        createdAt: new Date(),
        updatedAt: new Date(),
        totalViews: 1200,
        totalStars: 31,
      },
      {
        id: 4,
        hashId: 'bSiIu89_',
        title: 'Check network connectivity',
        userId: 0,
        description: 'Check network connectivity',
        cli: 'ping www.facebook.com',
        createdAt: new Date(),
        updatedAt: new Date(),
        totalViews: 13,
        totalStars: 13,
      },
      {
        id: 5,
        hashId: 'oQIWemA',
        title: 'Show All Hidden Files & Folders',
        userId: 0,
        description: 'Unlike in Windows, there is no option to view hidden files and folders in Mac OS X, unless you know the exact location. But by using this Terminal command, you can make them all visible. To hide them again, change "true" to "false."',
        cli: 'defaults write com.apple.finder AppleShowAllFiles -bool true',
        createdAt: new Date(),
        updatedAt: new Date(),
        totalViews: 1,
        totalStars: 0,
      },
      {
        id: 6,
        hashId: '9AqmQ83',
        title: 'md5sum',
        userId: 1,
        description: 'The “md5sum” stands for (Compute and Check MD5 Message Digest), md5 checksum (commonly called hash) is used to match or verify integrity of files that may have changed as a result of a faulty file transfer, a disk error or non-malicious interference.',
        cli: 'md5sum file.txt',
        createdAt: new Date(),
        updatedAt: new Date(),
        totalViews: 72,
        totalStars: 5,
      },
      {
        id: 7,
        hashId: '_23mA1mx',
        title: 'Command history',
        userId: 1,
        description: 'The “history” command stands for History (Event) Record, it prints the history of long list of executed commands in terminal.',
        cli: 'history',
        createdAt: new Date(),
        updatedAt: new Date(),
        totalViews: 2,
        totalStars: 4,
        totalForks: 11,
        totalComments:4,
      },
      {
        id: 8,
        hashId: 'kaAm124',
        title: 'Extract and uncompress files',
        userId: 1,
        description: 'Extract .tar.gz files',
        cli: 'tar xzvf archive.tar.gz',
        createdAt: new Date(),
        updatedAt: new Date(),
        totalViews: 0,
        totalComments: 0,
        totalForks: 0,
        totalStars:0,
      },
      {
        id: 9,
        hashId: 'cOlOd13',
        title: 'Shutdown computer',
        userId: 1,
        description: 'Shutdown the system and turn the power off immediately',
        cli: 'shutdown -h now',
        createdAt: new Date(),
        updatedAt: new Date(),
        totalViews: 1000,
        totalComments: 0,
      },
      {
        id: 10,
        hashId: 'mmAk22a',
        title: 'Show last line in file',
        userId: 0,
        description: 'Prints the last line',
        cli: 'tail -1 filename.txt',
        createdAt: new Date(),
        updatedAt: new Date(),
        totalViews: 0,
        totalComments: 0,
        totalForks: 0,
      },
      {
        id: 11,
        hashId: 'iOwqQ_1',
        title: 'RAM in Gigabytes',
        userId: 0,
        description: 'Shows available RAM in Gigabytes',
        cli: 'free -g',
        createdAt: new Date(),
        updatedAt: new Date(),
        totalViews: 0,
        totalComments: 0,
        totalForks: 0,
      },
      {
        id: 12,
        hashId: 'e_S3Ama1',
        title: 'Test github ssh connection',
        userId: 1,
        description: 'Test github accoun via SSH',
        cli: 'ssh -T git@github.com',
        createdAt: new Date(),
        updatedAt: new Date(),
        totalViews: 501,
        totalComments: 0,
        totalForks: 0,
      },
      {
        id: 13,
        hashId: 'aABc321',
        title: 'Start python webserver',
        userId: 0,
        description: 'Start a webserver using python',
        cli: 'python -m SimpleHTTPServer',
        createdAt: new Date(),
        updatedAt: new Date(),
        totalViews: 0,
        totalComments: 0,
        totalForks: 0,
      },
      {
        id: 14,
        hashId: 'WZWDwO',
        title: 'Find all javascript files',
        userId: 0,
        description: 'Find all files with .js extension',
        cli: 'find . -type f -name "*.txt"',
        createdAt: new Date(),
        updatedAt: new Date(),
        totalViews: 0,
        totalComments: 0,
        totalForks: 0,
      }
    ]);
  },

  down: function (queryInterface, Sequelize) {
    queryInterface.dropTable('Kommandrs');
  }
};
