/public/v1/get-cities/
{
"data": [
{
"id": 1,
"slug": "moskva",
"previewImage": "https://....",
"name": "Москва"
}
import telethon | |
import telethon.tl.types | |
import os | |
import json | |
import glob | |
api_id = 0 | |
api_hash = "" | |
limit = 50 |
/public/v1/get-cities/
{
"data": [
{
"id": 1,
"slug": "moskva",
"previewImage": "https://....",
"name": "Москва"
}
class JQ { | |
constructor(jq) { | |
this._jq = jq | |
} | |
sort(newSort) { | |
return {...this._jq, sort: newSort} | |
} | |
paginate(newPage) { | |
return {...this._jq, page: newPage} | |
} |
#!/usr/bin/env bash | |
# Фейковый npm | |
# Нужен для кэширования папки node_modules | |
# Кэш находится в папке ~/.cache/npm-inject/[sha1 хэш файла package.json]/node_modules | |
# | |
# В PATH надо добавить путь папки с фейковым npm, таким образом при выполнении команды `npm install` | |
# bash вызовет фейковый npm c параметром `install`. | |
# Фейк проверяет наличие папки [sha1 хэш файла package.json] в кэше. | |
# Если она в кэше, создаем на неё симлинк node_modules |
const puppeteer = require('puppeteer'); | |
const readline = require('readline-sync'); | |
const util = require('util'); | |
const fs = require('fs'); | |
const USERNAME = 'USERNAME'; | |
const EXPECTED_TEMPLATE_NAME = 'EXPECTED_TEMPLATE_NAME'; | |
const EXPECTED_ACCOUNT_NUMBER = 'EXPECTED_ACCOUNT_NUMBER'; | |
function questionAsync(text, hidden = false) { |
import React from 'react'; | |
import Rx from 'rx'; | |
import R from 'ramda'; | |
// dispatcher.js | |
const dispatcher = new Rx.ReplaySubject(); | |
function dispatch(action) { | |
dispatcher.onNext(action); | |
} |
/* @flow */ | |
type State = Object | |
type Action = {type: string | void} | |
type AsyncAction = (performAction: FluxPerformFunction, state: State) => void | |
type ActionCreator = () => Action | AsyncAction | |
type StoreFunction = (state: State, action: Action) => State |
function loadingIndicator() { | |
return Component => { | |
return class LodingIndicator extends React.Container { | |
// static displayName = | |
constructor() { | |
super(); | |
this.state = { | |
counters: {}, | |
}; | |
} |
'use strict'; | |
const CypherQuery = require('./cypher').CypherQuery; | |
module.exports = function createQueryExecutor(context) { | |
const executor = function executeQuery(query) { | |
if (typeof query === 'function') { | |
return query(executor); | |
} |