Skip to content

Instantly share code, notes, and snippets.

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

Alexander Panko panki

🏠
Working from home
View GitHub Profile
@panki
panki / index.js
Created September 12, 2016 22:48
prepare files
_prepareDocumentFiles (release, content) {
const pagesCount = content.length;
const pages = content.map(page => Object.assign({}, page)); // clone
const resolutions = portals.getDocumentResolutions(release.portal_id);
let watermark = null; // path to temp file with portal watermark
let fullDocument = null; // path to temp file with combined pdf
console.log(release, pages);
@panki
panki / index.js
Created September 12, 2016 22:46
_prepareDocumentFiles (release, content) {
const pagesCount = content.length;
const pages = content.map(page => Object.assign({}, page)); // clone
const resolutions = portals.getDocumentResolutions(release.portal_id);
let watermark = null; // path to temp file with portal watermark
let fullDocument = null; // path to temp file with combined pdf
console.log(release, pages);
content-pipeline git:master ❯ make run ⏎ ✖ ✹ ✭
#make npm-auth
docker-compose up
Building server
Step 1 : FROM node:6.3
---> 0d9089853221
Step 2 : MAINTAINER Alexander Panko
---> Using cache
---> d52c3fb7b2c0
Step 3 : RUN mkdir /src
@panki
panki / 1
Created March 22, 2016 13:15
redis log
[3453] 22 Mar 14:13:50 * Background saving terminated with success
[3453] 22 Mar 14:16:57 * 10000 changes in 60 seconds. Saving...
[3453] 22 Mar 14:16:57 * Background saving started by pid 18704
[18704] 22 Mar 14:17:13 * DB saved on disk
[3453] 22 Mar 14:17:13 * Background saving terminated with success
[3453] 22 Mar 14:21:04 * 10000 changes in 60 seconds. Saving...
[3453] 22 Mar 14:21:05 * Background saving started by pid 18719
[18719] 22 Mar 14:21:24 * DB saved on disk
[3453] 22 Mar 14:21:24 * Background saving terminated with success
[3453] 22 Mar 14:26:25 * 10 changes in 300 seconds. Saving...
{{EPOLLIN, {u32=12, u64=12}}}, 1024, 78831) = 1
clock_gettime(CLOCK_MONOTONIC, {7175194, 731236628}) = 0
read(12, "", 65536) = 0
futex(0x7f3cc00008c8, FUTEX_WAKE_PRIVATE, 1) = 1
gettimeofday({1439632566, 942141}, NULL) = 0
close(12) = 0
write(1, "\33[0mPOST /transaction/confirmed/"..., 57) = 57
clock_gettime(CLOCK_MONOTONIC, {7175194, 732537335}) = 0
epoll_wait(5, {{EPOLLIN, {u32=10, u64=10}}}, 1024, 119999) = 1
clock_gettime(CLOCK_MONOTONIC, {7175194, 828808034}) = 0
# -*- coding: utf-8 -*-
from contextlib import contextmanager
from functools import wraps
import functools
from payme import types
from . import test
from sqlalchemy import MetaData, create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
# -*- coding: utf-8 -*-
from contextlib import contextmanager
from functools import wraps
from payme import types
from . import test
from sqlalchemy import MetaData, create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base