- First install
tor
andprivoxy
and config them. - Create a file in this directory with below config:
touch /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=127.0.0.1:8118"
psql |
mongod --dbpath /data/<path> --port <port no> | |
http://pdf2md.morethan.io/ |
import rlcompleter, readline | |
readline.parse_and_bind('tab:complete') |
apt install python3-pip | |
pip3 install virtualenv | |
which virtualenv | |
cd /home/morteza/Desktop/ | |
mkdir python | |
cd python/ | |
virtualenv test | |
You must provide a DEST_DIR | |
Usage: virtualenv [OPTIONS] DEST_DIR |
import ldap, sys | |
LDAP_SERVER = 'ldaps://grep01.test.test.ir' | |
LDAP_BASE = 'ou=Special Users,dc=gandou,dc=test,dc=test,dc=ir' | |
BIND_USER = 'uid=ibsngproxy,ou=Users,dc=test,dc=test,dc=ir' | |
BIND_PASSWORD = 'halohalohalo' | |
ldap.set_option(ldap.OPT_DEBUG_LEVEL, 4095) | |
try: | |
l = ldap.initialize(LDAP_SERVER) |
# Docker installation script for Debian 8 Jessie on Azure | |
# Usage: execute sudo -i, first. | |
# wget -q -O - "$@" https://gist.githubusercontent.com/tsaqib/b2c83ac30f962ab78a5472902c325aa9/raw/ --no-cache | sh | |
# After running the script reboot and check whether docker is running. | |
apt-get purge lxc-docker* | |
apt-get purge docker.io* | |
apt-get update -y && sudo apt-get upgrade -y | |
apt-get install -y apt-transport-https ca-certificates |
tor
and privoxy
and config them.touch /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=127.0.0.1:8118"
import sys, ldap | |
# DN = username@example.com, secret = password, un = username | |
DN, secret, un = sys.argv[1:4] | |
server = "ldap://server.com" | |
port = 389 | |
base = "dc=example,dc=com" | |
scope = ldap.SCOPE_SUBTREE |
git diff core/snapshot/plugins/user_bw.py | |
diff --git a/core/snapshot/plugins/user_bw.py b/core/snapshot/plugins/user_bw.py | |
index fedd628..6ce7f9d 100755 | |
--- a/core/snapshot/plugins/user_bw.py | |
+++ b/core/snapshot/plugins/user_bw.py | |
@@ -42,8 +42,8 @@ class UserBWPlugin(ClientInterface): | |
# sometimes user goes offline and we | |
# are getting None value for user_obj | |
- if user_obj is None: |
from core.errors import * | |
from core.ibs_exceptions import * | |
toLog("HEEEEEEEEEEEEEEEEEEEEEEEEEE", LOG_DEBUG) | |
error, auth_response = user_worker_main.getMPIHUB().\ | |
evaluateOnMain(True, | |
"ldap_main.getManager().authenticate", | |
[ldap_dn, clear_text_password, True] | |
) | |
toLog(">>>>> {} {}".format(ldap_dn, error, auth_response), LOG_DEBUG) |