Skip to content

Instantly share code, notes, and snippets.

View miletskiy's full-sized avatar
:octocat:
Commiting

Sergiy Miletskyi miletskiy

:octocat:
Commiting
View GitHub Profile
# Freelancing Reviews Samples
=======================================================================
****
=======================================================================
## Buyer Reviews to Sellers
=======================================================================
@Ryanb58
Ryanb58 / install.md
Last active December 31, 2025 20:22
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found

/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]

Basics

  • $LOCAL_HOST: 'localhost' or hostname from local network
  • $LOCAL_PORT: open port on local machine
  • $REMOTE_HOST: remote hostname visible from remote network
  • $REMOTE_PORT: port on $REMOTE_HOST

Forward Tunnel: map port from remote machine/network on local machine

ssh -L $LOCAL_PORT:$REMOTE_HOST:$REMOTE_PORT $USER@$SERVER

Reverse Tunnel: make local port accessable to remote machine

@vitorfs
vitorfs / secret.py
Created October 30, 2017 09:27
Generate secret key
from django.utils.crypto import get_random_string
chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
random_string = get_random_string(50, chars)
print(random_string)
@deuterium7
deuterium7 / test_app.md
Last active February 23, 2025 17:50
Тестовое задание, Laravel

Тестовое задание по Laravel

16.10.2017:

Читаю "Разобраться с основами git и git-flow"

  • зачем нужны ветки ? (для возможности работы с отдельным частями проекта)
  • какие бывают ветки ? (master: по-умолчанию, develop и другие вспомогательные ветки)
  • зачем нужен .gitignore ? (для исключения из git'а файлов и папок, чтобы исключить конфликты при слиянии веток)
  • какие проблемы за нас решает git-flow и почему стоит его использовать ? (git-flow автоматизирует процесс управления версиями и приводит систему к общепринятой модели управления версиями)
  • что будет если не писать сообщения к комитам ? (тяжело будет разобраться в каком состоянии находится проект и какие правки были введены)

Читаю о тестировании

  • unit testing (необходимо для тестирования отдельных модулей системы, как-правило это какие-то классы или объединенные участки кода имеющие общую цель)
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@kingspp
kingspp / logging.py
Created April 22, 2017 07:14
Python Comprehensive Logging using YAML Configuration
import os
import yaml
import logging.config
import logging
import coloredlogs
def setup_logging(default_path='logging.yaml', default_level=logging.INFO, env_key='LOG_CFG'):
"""
| **@author:** Prathyush SP
| Logging Setup
@macloo
macloo / local_db_test.py
Last active March 12, 2024 18:00
Test your MySQL database connection for Flask-SQLAlchemy
#!/Users/username/Documents/python/projectname/env/bin/python
# change username and projectname above to match yours - the path must match the path in YOUR virtualenv
"""
edit line 1 to match what YOU get when you are in YOUR virtualenv and type:
which python
# NO SPACES in first 3 chars in line 1: #!/
# make sure env is activated!
@nickoala
nickoala / 0_python_email.md
Last active March 2, 2026 05:58
Use Python to send and receive emails

Use Python to:

  • send a plain text email
  • send an email with attachment
  • receive and filter emails according to some criteria
@wolever
wolever / bcsx.rst
Last active December 9, 2022 07:41
Blockchain Santa Exchange (working title): organizing fair and secure secret santa gift exchanges on the blockchain

By shazow and wolever.

Problem

How can N secret santa gift exchange participants agree on a gift-giver -> gift-recipient bijection such that: