This file contains hidden or 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
# import goes here | |
# client that runs ecs task | |
def call_ecs_task(ecs_client, payload): | |
results = ecs_client.run_task() | |
pass | |
# client that runs lambda task |
This file contains hidden or 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
# import goes here | |
def lambda_handler(event, context): | |
# lambda code goes here | |
pass | |
if __name__ == '__main__': # in case if we run it in a container | |
if 'EVENT' not in os.environ: | |
raise Exception('No event provided in os.environ.') | |
else: |
This file contains hidden or 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
[ODBC] | |
Trace=1 | |
ForceTrace=1 | |
TraceFile=/tmp/Trace.txt | |
TraceLibrary=libodbctrac.so |
This file contains hidden or 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
%let LD_LIBRARY_PATH =%sysget(LD_LIBRARY_PATH); | |
%put LD_LIBRARY_PATH is &LD_LIBRARY_PATH; | |
%let ODBCINST =%sysget(ODBCINST); | |
%put ODBCINST is &ODBCINST; |
This file contains hidden or 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
git rev-list -n 1 HEAD -- <file_path> | |
git checkout <deleting_commit>^ -- <file_path> |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Deduplication collection mongodb database utility. | |
# | |
# Works only with pymongo >= 3.0 | |
# Kireal | |
# | |
# 01.10.2016 | |
# Last change: 04.10.2016 |
This file contains hidden or 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
The FORWARD chain does need policy set to ACCEPT if you have --iptables=false. It only appears this is not needed because the Docker installation package auto starts Docker and adds iptable rules the FORWARD chain. When afterwards you add --iptables=false to your config and restart docker those rules are still there. After the next reboot these rules will be gone and your containers wont be able to communicate unless you have the FORWARD chain policy set to ACCEPT. | |
What you need for a setup that allows filtering with UFW, inter container networking and outbound connectivity is | |
start docker with --iptables=false | |
FORWARD chain policy set to ACCEPT | |
add the following NAT rule: | |
iptables -t nat -A POSTROUTING ! -o docker0 -s 172.17.0.0/16 -j MASQUERADE | |
This file contains hidden or 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
Инструкция от саппорта гугла для возвращению русского маркета: | |
1) Войдите в свой аккаунт Google Wallet для управления способами оплаты ( wallet.google.com/manage/paymentMethods ) | |
2) Добавить новую карту или изменить настройки по умолчанию платежного инструмента на один с платежный адрес находится внутри желаемую страну | |
3) Откройте Play магазин и перейдите к любому элементу доступна для загрузки | |
4) Нажмите, чтобы начать загрузку, пока не достигнете «Принять и купить» экран (нет необходимости для завершения покупки) | |
5) Закройте магазин Play и ясные данные для магазина Google Play приложений (настройки> приложения> Google Play магазин> Удалить данные) или очистить кэш браузера | |
6) Re-Play открыть магазин. Теперь вы должны увидеть Play магазина, который соответствует вашей стране биллинга оплаты по умолчанию инструмента. |
This file contains hidden or 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
Running Docker behind the ufw firewall | |
Ubuntu ships with a very nice and simple frontend for iptables called ufw (uncomplicated firewall). Ufw makes it possible to setup a firewall without having to fully understand iptables itself. When you however are using Docker and you want to combine Docker with the ufw service. Things do get complicated. | |
The docker service talks directly to iptables for networking, basically bypassing everything that’s getting setup in the ufw utility and therefore ignoring the firewall. Additional configuration is required to prevent this behavior. The official Docker documentation however, seems to be incomplete. | |
Configure DEFAULT_FORWARD_POLICY and port 2375 | |
Connections from docker containers get routed into the (iptables) FORWARD chain, this needs to be configured to allow connections through it. The default is to DROP the connections so a change is required: |
This file contains hidden or 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 | |
sudo ufw disable | |
sudo iptables -F ufw-caps-test | |
sudo iptables -X ufw-caps-test | |
sudo iptables -Z ufw-caps-test | |
sudo ufw enable |
NewerOlder