Skip to content

Instantly share code, notes, and snippets.

@airatkh
airatkh / api.saferoute.ru
Created July 29, 2019 12:14
api.saferoute.ru
https://api.saferoute.ru/api/:key/sdk/widget-settings.json
```
Expected:
{
"status": "ok",
"message": "",
"data": {
"1": {
"type": 1,
@airatkh
airatkh / responce.md
Last active June 7, 2019 13:37
responce.md

RESPONSE:

order_1               | [07/Jun/2019 16:36:26.072] DEBUG [client.py:72] RESPONSE:
order_1               | 	status: 200
order_1               | 	text:     <!DOCTYPE html>
order_1               |     <html lang="ru">
order_1               |     <head>
order_1               |         <meta charset="UTF-8">
order_1               |         <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
@airatkh
airatkh / example_order_create.md
Created June 7, 2019 13:33
example_order_create.md

[07/Jun/2019 16:30:07.779] INFO [client.py:66] REQUEST:

url: https://saferoute.ru/api/<api_key>/order/create.json

data:

{'type': 1,
@airatkh
airatkh / ddelivery_web_hook
Created February 4, 2019 08:01
ddelivery_web_hook
POST /ddelivery-webhook/traffic-orders.json?k=<token_ddelivery>
=> generated 9 bytes in 22 msecs (HTTP/1.1 200) 2 headers in 73 bytes (1 switches on core 0)
[04/Feb/2019 10:28:09.335]
INFO [views.py:783] in DdeliveryWebHookSetViewSet:create request.data =
<QueryDict:
{
'status_dd': ['13'],
'track_number': ['dd-583767'],
'id': ['583767'],
'status_dd_name': ['1'],
#псевдокод
def reverse(list):
for index in len(list):
list_rever[len(list)-index] = list[index]
return list_rever
@airatkh
airatkh / reversed
Created February 2, 2019 07:23
reverse
test_arr = list(range(10))
print(test_arr)
print(test_arr[::-1])
test_arr = list(range(50))
for i in test_arr:
test_arr.remove(i)
print(test_arr)
order_1 | [29/May/2018 15:11:29.068] INFO [models.py:1843] Generate barcode layout 142A170: success
rabbitmq_1 | 2018-05-29 12:11:29.134 [info] <0.1050.0> accepting AMQP connection <0.1050.0> (10.30.34.22:34986 -> 10.30.34.10:5672)
rabbitmq_1 | 2018-05-29 12:11:29.136 [info] <0.1050.0> connection <0.1050.0> (10.30.34.22:34986 -> 10.30.34.10:5672): user 'guest' authenticated and granted access to vhost '/'
genpdf_1 | [pid: 17|app: 0|req: 1/1] 10.30.34.18 () {30 vars in 347 bytes} [Tue May 29 15:11:29 2018] POST / => generated 9 bytes in 64 msecs (HTTP/1.1 200) 1 headers in 51 bytes (1 switches on core 0)
order_1 | [29/May/2018 15:11:29.140] INFO [models.py:1599] in query_to_generate_pdf: Order = Заказ 170 макет 68bd1fb5-a398-4593-840e-2cd7964d7c48 тираж 1 res = <Response [200]> res.text = {"ok": 1}
order_1 | DefaultErrorReporting.report_exception
order_1 | Traceback (most recent call last):
order_1 | File "./order/api.py
@airatkh
airatkh / .gitlab-ci.yml
Created May 2, 2018 19:42 — forked from andrewstuart/.gitlab-ci.yml
One Deployment Per branch, plus CI CD, gitlab and helm setup
image: docker.mydomain.com/build/kube-go-make
variables:
DOCKER_TAG: docker.mydomain.com/myapp/home:$CI_COMMIT_REF_SLUG
DOCKER_HOST: tcp://localhost:2375
DOCKER_DRIVER: overlay
PROD_RSYNC_HOST: myprodserver.com
DOMAIN: mydomain.com
CHART_DIR: chart
FROM center.u4u.online/ubuntudev
RUN curl -sL https://deb.nodesource.com/setup_9.x | bash -
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libfontconfig \
imagemagick \
gettext \
gcc \