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
#!python | |
#-*-coding:utf8-*- | |
''' | |
Стоянов Евгений [email protected] | |
Модуль для удобного обмена с 1С:Предприятие 8.Х | |
Позволяет сформировать в строку списки и таблицы значений для дальнейшего восставновления в 1С. | |
Массив | |
{"#",51e7a0d2-530b-11d4-b98a-008048da3034, | |
{2, |
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
#!python | |
#-*-coding:utf8-*- | |
''' | |
Стоянов Евгений [email protected] | |
Модуль для формирования внутреннего представления типов 1С 7.7, которые можно восстановить с помощью методов ЗначениеИзСтроки() | |
ТаблицаЗначений | |
{"ТаблицаЗначений","2",{"0","","0","0","0","","2",{{"Кол1","Кол1","1","0","0",{"Строка",""},"","0",{{"Строка","тест"}}},{"Кол2","Кол2","1","0","1",{"Строка",""},"","0",{{"Строка","1231"}}}}}} | |
''' | |
import copy |
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
#!/bin/bash | |
set -ve | |
lxc-create -n vpn -t ubuntu | |
# ln -s /var/lib/lxc/vpn/config /etc/lxc/auto/vpn.conf | |
perl -i -ple 's/#lxc.aa_profile = unconfined/lxc.aa_profile = unconfined/' /etc/lxc/auto/vpn.conf | |
perl -i -ple 's/^exit 0/# exit 0/' /etc/rc.local | |
cat >>/etc/rc.local <<hello | |
mkdir -p /var/lib/lxc/vpn/rootfs/dev/net/ |
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
#coding:utf8 | |
from __future__ import unicode_literals | |
from celery import current_app, task | |
from functools import wraps | |
import logging | |
import simplejson | |
import time | |
mylog = logging.getLogger(__name__) |
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
from __future__ import absolute_import, division, print_function, unicode_literals | |
import sqlite3 | |
import logging | |
import time | |
__version__ = "0.1.0" | |
initial_sql = """CREATE TABLE IF NOT EXISTS log( |
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
#!/bin/sh | |
# /usr/bin/init-zram-swapping | |
# load dependency modules | |
NRDEVICES=$(grep -c ^processor /proc/cpuinfo | sed 's/^0$/1/') | |
if modinfo zram | grep -q ' zram_num_devices:' 2>/dev/null; then | |
MODPROBE_ARGS="zram_num_devices=${NRDEVICES}" | |
elif modinfo zram | grep -q ' num_devices:' 2>/dev/null; then | |
MODPROBE_ARGS="num_devices=${NRDEVICES}" | |
else |
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
version: "2" | |
services: | |
db: | |
restart: always | |
#image: quickes/pg1c:12.6_6 | |
image: quickes/pg1c:12.7_1 | |
shm_size: 4G | |
stop_grace_period: 1m | |
stop_signal: SIGINT | |
oom_score_adj: -1000 |
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
class SelectFieldDynamic(SelectField): | |
# use function in choices | |
def __init__(self, label=None, validators=None, coerce=str, choices=None, validate_choice=True, **kwargs): | |
super(SelectFieldDynamic, self).__init__(label, validators, **kwargs) | |
self.coerce = coerce | |
self.choices = choices | |
self.validate_choice = validate_choice | |
def iter_choices(self): |
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
name: hydrogen | |
version: "1.1.1" | |
description: | | |
Hydrogen is a software synthesizer which can be used alone, | |
emulating a drum machine based on patterns, or via an external | |
MIDI keyboard/sequencer software. Hydrogen runs on Linux, Mac OS X and Windows. | |
summary: "Hydrogen is a software synthesizer" | |
base: core18 | |
architectures: | |
- build-on: [amd64] |
OlderNewer