This file contains hidden or 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
cd ~/.ssh | |
Host netvest-dev | |
User ubuntu | |
HostName | |
IdentitiesOnly yes | |
IdentityFile ~/.ssh/WeezLabsDev.pem | |
This file contains hidden or 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
//load | |
psql -d db_name < file_name.sql | |
//upload | |
pg_dump -U user_name -W -C db_name -t table_name > file_name.sql | |
This file contains hidden or 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
document.removeEventListener("keydown", this.handleEscapeButton, false); | |
handleEscapeButton = (event) => { | |
if (event.keyCode === 27) { | |
this.setState({ openFilter: false }); | |
} | |
}; |
This file contains hidden or 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
const logRequestStart = (req, res, next) => { | |
console.log('\x1b[33m%s\x1b[0m', `${req.method} ${req.originalUrl}`) | |
res.on('finish', () => { | |
console.log(`${res.statusCode} ${res.statusMessage}; ${res.get('Content-Length') || 0}b sent`) | |
}) | |
next() | |
} |
This file contains hidden or 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
//custom textInput filter. | |
function setInputFilter(textbox, inputFilter) { | |
["input", "keydown", "keyup", "mousedown", "mouseup", "select", "contextmenu", "drop"].forEach(function (event) { | |
textbox.addEventListener(event, function () { | |
if (inputFilter(this.value)) { | |
this.oldValue = this.value; | |
this.oldSelectionStart = this.selectionStart; | |
this.oldSelectionEnd = this.selectionEnd; |
This file contains hidden or 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
const getInitialModalState = () => ({ | |
projects: {}, | |
modalCreate: false, | |
modalAskForDelete: false, | |
currentId: 0, | |
currentDescription: '', | |
currentStart: defaultDate, | |
currentEnd: defaultDate, | |
currentDate: defaultDate, | |
currentTitle: 'Добавить переработку', |
This file contains hidden or 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
'use strict'; | |
module.exports = { | |
up: (queryInterface, Sequelize) => { | |
return queryInterface.changeColumn( | |
'table', | |
'column', | |
{ | |
type: Sequelize.TEXT, | |
} |
This file contains hidden or 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
const pattern = /^\d{0,4}(\.\d{0,4})?$/; | |
console.log('@@@MATCH', pattern.test(text)); |
This file contains hidden or 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
{ | |
"USD": { | |
"symbol": "$", | |
"name": "US Dollar", | |
"symbol_native": "$", | |
"decimal_digits": 2, | |
"rounding": 0, | |
"code": "USD", | |
"name_plural": "US dollars" | |
}, |
OlderNewer