- Modify & run
dump-sequelize-schema.js
.- It currently uses a few
lodash
methods, so be sure to temporarily install them—or if you feel up to it you can rewrite the script so they're not needed. npm i lodash.sortby lodash.pick lodash.omit lodash.mapvalues
- It currently uses a few
- Inspect
sequelize-schema.json
and make sure it appears represent all of your tables, attributes, indexes, constraints, references, etc... - When you are satisfied, copy and rename
sequelize-schema.json
file into amigration-extras/
directory that is next to yourmigrations/
. Name itinitial-sequelize-schema.json
.migration-extras/
- ->
initial-sequelize-schema.json
- ->
migrations/
- (this folder should probably be empty)
- Run
sequelize migration:create
and then copy the contents of2018XXXXXXXXXX-initial-migration.js
into the newly generated migration script. No additional modifications are required if y
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. | |
* For licensing, see LICENSE.md. | |
*/ | |
/* globals window */ | |
/** | |
* @module adapter-base64/uploadadapter | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# https://docs.docker.com/install/linux/docker-ce/ubuntu/ | |
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable" | |
sudo apt-get update | |
sudo apt-get install docker-ce | |
# https://docs.docker.com/compose/install/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mySlowFunction(baseNumber) { | |
console.time('mySlowFunction'); | |
let result = 0; | |
for (var i = Math.pow(baseNumber, 7); i >= 0; i--) { | |
result += Math.atan(i) * Math.tan(i); | |
}; | |
console.timeEnd('mySlowFunction'); | |
} | |
mySlowFunction(8); // higher number => more iterations => slower |
If you have Word 2003 and 2007 installed on the same machine, recent updates might have caused a condition in which 07 it runs the configuration dialog every time you open a document. A quick workaround is:
- Open
regedit
- Navigate to
HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options
- Create new
DWORD
calledNoReReg
- Give it a hexadecimal value of
1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* message - сообщение, которое будет опубликовано | |
* image - картинка для постинга | |
* user_id - id текущего пользователя (к нему будет осуществлён постинг) | |
*/ | |
function wallPost(message, image, user_id) { | |
VK.api('photos.getWallUploadServer', { | |
uid: user_id | |
}, function (data) { | |
if (data.response) { |