Skip to content

Instantly share code, notes, and snippets.

Artur Barseghyan barseghyanartur

Block or report user

Report or block barseghyanartur

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View generate_random_password.md
openssl rand -base64 12 | cut -c1-12
View podman_install_reqs_in_all_running_containers.md
for cont in $(podman ps -q); do podman exec -it ${cont} /bin/bash -c "pip install django-request-logging"; done
@barseghyanartur
barseghyanartur / type_hints.rst
Created Apr 30, 2020
Type hints cheat sheet (Python 3)
View type_hints.rst

Originally taken from (source).

Type hints cheat sheet (Python 3)

This document is a quick cheat sheet showing how the PEP 484 type annotation notation represents various common types in Python 3.

@barseghyanartur
barseghyanartur / django_db_logging.md
Created Apr 22, 2020
Patch logging for django.db on the fly from terminal
View django_db_logging.md

Patch:

import logging
logger = logging.getLogger('django.db')
logger.level = logging.DEBUG

Now we can:

@barseghyanartur
barseghyanartur / bench.py
Created Apr 22, 2020 — forked from marians/bench.py
Benchmarking serialization/unserialization in python using json, pickle and cPickle
View bench.py
import cPickle
import pickle
import json
import random
from time import time
from hashlib import md5
test_runs = 1000
def float_list():
@barseghyanartur
barseghyanartur / bench.py
Created Apr 22, 2020 — forked from marians/bench.py
Benchmarking serialization/unserialization in python using json, pickle and cPickle
View bench.py
import cPickle
import pickle
import json
import random
from time import time
from hashlib import md5
test_runs = 1000
def float_list():
@barseghyanartur
barseghyanartur / index.md
Created Apr 14, 2020
Go into the podman container as root
View index.md
podman exec -it -u root container_name /bin/bash
@barseghyanartur
barseghyanartur / apache-multi-ad-reverse-proxy.conf
Created Mar 16, 2020 — forked from alivesay/apache-multi-ad-reverse-proxy.conf
Apache reverse proxy with LDAP authentication against multiple Active Directory domains
View apache-multi-ad-reverse-proxy.conf
<AuthnProviderAlias ldap auth1>
AuthLDAPURL "ldaps://auth1.example.com:636/DC=example,DC=com?sAMAccountName?sub?(objectClass=*)"
AuthLDAPBindDN "ldap_query"
AuthLDAPBindPassword "password"
</AuthnProviderAlias>
<AuthnProviderAlias ldap auth2>
AuthLDAPURL "ldaps://auth2.example.com:636/DC=example,DC=com?sAMAccountName?sub?(objectClass=*)"
AuthLDAPBindDN "ldap_query"
AuthLDAPBindPassword "password"
You can’t perform that action at this time.