Skip to content

Instantly share code, notes, and snippets.

View egorguscha's full-sized avatar
🏠
Working from home

Egor egorguscha

🏠
Working from home
View GitHub Profile
async function updateUser(token) {
let cancelled = false;
// we don't reject, since we don't have access to
// the returned promise
// so we just don't call other functions, and reject
// in the end
token.cancel = () => {
cancelled = true;
};
function CoffeeMachine(power, capacity) {
Machine.apply(this, arguments);
let waterAmount;
const WATER_HEAT_CAPACITY = 4200;
let timerId;
console.log('Create coffee machine with capacity of ' + power + ' vt');
this.setWaterAmount = function (amount) {
if (amount < 0) throw new Error('The number must be positive');
if (amount > capacity) throw new Error('Do not add more water then ' + capacity);
<?
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php");
$APPLICATION->SetTitle("1С-Битрикс: Управление сайтом");
CModule::IncludeModule('iblock');
$arrConcert = array();
$res3 = CIBlockElement::GetList(array('PROPERTY_DATE' => 'ASC'),array( 'IBLOCK_ID' => 1,));
while ($obj = $res3->GetNextElement()){
const PATH = require('path');
const WEBPACK = require('webpack');
const HTML_WEBPACK_PLUGIN = require('html-webpack-plugin');
const MERGE = require('webpack-merge');
const PUG = require('./webpack/pug');
const DEVSERVER = require('./webpack/devserver');
const CSS = require('./webpack/css');
const FONTS = require('./webpack/fonts');
const IMAGES = require('./webpack/images');
const SPRITE_SVG = require('./webpack/svg-sprite');
import React, {Component} from 'react';
import {withRouter} from 'react-router-dom';
import Header from "../components/header";
import axios from "axios";
import serialize from "form-serialize";
class Jurist extends Component {
constructor(props) {
import React, {Component} from 'react';
import {withRouter} from 'react-router-dom';
import Header from "../components/header/header";
import axios from 'axios';
// let newarr = [];
class News extends Component {