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
if (typeof Object.create !== 'function') { | |
Object.create = function(o, props) { | |
function F() {} | |
F.prototype = o; | |
if (typeof(props) === "object") { | |
for (prop in props) { | |
if (props.hasOwnProperty((prop))) { | |
F[prop] = props[prop]; | |
} |
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 all(promises) { | |
return new Promise(function(resolve,reject) { | |
var count = promises.length | |
var result = [] | |
var checkDone = function() { | |
if (--count === 0) { | |
resolve(result) | |
} | |
} | |
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
Общие вопросы: | |
Парадигмы программирования. | |
Шаблоны программирования. | |
Зачем нужны принципы SOLID. | |
Инкапсуляция, наследование, полиморфизм, абстракция. | |
Функциональное программирование (иммутабельность данных, отсутствие состояния, композиция функций). | |
Императивное, декларативное программирование. | |
Как писать код хорошо, в едином стиле когда ты работаешь в команде из нескольких человек? | |
Код ревью процессы. | |
Структуры данных. |
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
https://eventplanningservice.eventdata-services.com/api/booking/book | |
{ | |
"opportunityId": "7000990D-64E3-E811-80E5-000D3A22E075", | |
"products": [], | |
"facilities": [{ | |
"id": "1657024e-15ca-e811-80e4-000d3a22e075", | |
"name": "Beamer 314x1500", | |
"from": "2018/11/09 13:00", | |
"to": "2018/11/10 13:00", |
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
{ | |
"products": [{ | |
"name": "Regular Room Rental", | |
"id": "f582a1e2-bac4-e811-80e4-000d3a22e075", | |
"quantity": 0 | |
}], | |
"equipments": [{ | |
"type": "Equipment", | |
"id": "1657024e-15ca-e811-80e4-000d3a22e075", | |
"from": "2018-10-23T06:00:00Z", |
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
export Form extends Component { | |
state = { | |
placeName: '', | |
}; | |
onChange = (e) => { | |
this.setState({ | |
placeName: e.target.value | |
}); | |
}; |
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
import { App } from '../components/App'; | |
const mapStateToProps = () => {}; | |
const mapDispatchToProps = {}; | |
const AppContainer = connect(mapStateToProps, mapDispatchToProps)(App); | |
export AppContainer; |
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
"env": { | |
"browser": true, | |
"es6": true | |
}, | |
"extends": "eslint:recommended", | |
"parserOptions": { | |
"ecmaFeatures": { | |
"experimentalObjectRestSpread": true, | |
"jsx": true | |
}, |
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
service: | |
async getJobSchedule({ augurCode, jobType }) { | |
const readFileAsync = Promise.promisify(fs.readFile); | |
const filePath = path.resolve(`${__dirname}/../etc/cron.d/${augurCode}_${jobType}.conf`); | |
const contents = await readFileAsync(filePath, 'utf8'); | |
console.log('blaaa', filePath, contents); | |
return {}; | |
} | |
Route Method: | |
export function* getJobSchedule() { |
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
import { createStore, combineReducers, applyMiddleware } from 'redux'; | |
// import thunk from "redux-thunk"; | |
const reducer = (state = {}, action) => { | |
switch (action.type) { | |
case 'HI_': { | |
debugger | |
return { | |
...state, | |
hi: 'hi' |
NewerOlder