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 / ELK with Nginx.md
Created Sep 8, 2017 — forked from Dev-Dipesh/ELK with Nginx.md
Setting up Elasticsearch, Logstash and Kibana with Nginx.
View ELK with Nginx.md

ELK (Elasticsearch Logstash Kibana)

Though we're focused more on server setup procedure in this document, I will still give a very brief explanation in laymen terms for ELK. To those who are starting new in this stack, must have already heard of MVC (Model View Controller), so take it like this:

  • Model => Elasticsearch (for Storage, Indexing & Search)
  • View => Kibana (for DataViz & G-Man, yeah the one in half life 😏)
  • Controller => Logstash (For Logs & Filtering)

You can’t perform that action at this time.