*ARGS.TECH | BLOG | PAGE 4 | Shakhzhakhan Maxudbek's personal blog
Loading...
BLOG


Django SECRET_KEY need for providing cryptographic signing (documentation). This value is stored in <your_app>/settings.py file. When you start new project it will be generated from built-in function (source code). For production deployment SECRET_KEY must be strong and reliably protected.


These steps help you for generating new SECRET_KEY value:


1. Activate your project's virtual environment:

source env/bin/activate


2. Enter in Django's manage.py shell:

python3 manage.py shell


3. Import get_ra…


Introduction


Telegram provides a powerful and simple API for interacting with users via bots. Whether you are building a notification system for your server, a feedback bot, or simply automating daily tasks, the Telegram Bot API is an excellent choice.


You can interact with the API using standard HTTP methods (GET and POST) from any programming language. In this tutorial, we will focus on Python and the requests library to send text messages and files.


Since we will b…


Hardcoding tokens, database credentials and other sensitive data in .py files is not secure. Many people use django-environ library, but I think it inconvenient. So I use yaml files for storing sensitive data and pyyaml library for reading data of them.

Create project folder:

mkdir myproject

Switch in created folder:
cd myproject

Create virtual environment:
python3 -m venv env

Activate virtual environment:
source env/bin/activate

Install Django and pyyaml:
pip3 install django pyyaml

Start new Django proje…


# Docker overview

Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker's methodologies for shipping, testing, and deploying code, you can significantly reduce the delay between writing code and running it in production. Documentation.

# Ba…


If you've worked with Python's requests library to make HTTPS calls, you've almost certainly run into this wall of yellow text in your console:

InsecureRequestWarning: Unverified HTTPS request is being made.

Adding certificate verification is strongly advised.

See: https://urllib3.readthedocs.io/en/latest/advanced-layout.html#ssl-warnings


This warning is common, frequently Googled, and often "f…


After we're figured out the setup cron jobs in operating system, it's time to learn how to run any scripts in Docker container.


Create folder with your project's name and create there four text files with following names:

myproject/
  - my_script.py
  - cronjob
  - Dockerfile
  - docker-compose.yaml

File my_script.py need for run periodically. It may contain any code for your job. For example:
import requests
r = requests.get(url='https://example.com/')
if r.status_code == 200:
 &…


Допустим тебе надоело работать кассиром в Макдоналдсе, и ты решил ворваться в сферу информационных технологий «с ноги».

Что для этого нужно:
- Усидчивость;
- Терпение;
- Умение пользоваться «Гуглом»;
- Убрать в сторону всякие «не хочу», «не буду».

Что нужно изучать? Все советуют выбрать направление и начинать учиться по нему. Я же скажу что, независимо от выбранного направления, ты должен изучить «базу». Иначе ты становишься хирургом, не знающим анатомию! Не важно, будешь ты инженером по аппаратному …


- Configuring Cisco firewall in Linux machine with Minicom

-> Configuring network access with Cisco ASA via minicom utility


Configuring Cisco ASA 5500-series as network gateway and share internet access to users through local area network (LAN) with DHCP and DNS.


CIsco devices have three mode in command line interface:

- First mode after you connected to device is unprivileged mode. This mode allows only monitoring and you can't modify running configurations.

- Second mode - privileged, allows c…

Stop using nohup. Learn the professional way to manage your Java applications with auto-restart, logging, and background execution.


Introduction


When developing a Spring Boot application, you typically run it using java -jar app.jar or mvn spring-boot:run. However, on a production server, this approach has problems:

  • If you close the terminal, the app stops.
  • Using nohup (e.g., nohup java -jar ... &) is unreliable and makes stopping the …


When you bought new virtual private server (VPS) most providers give machines with remotely root access by SSH protocol, and it's not safe. This article provide some tips for help you increase VPS server's security. Let's start setting up.


First of all connect to your new server:

ssh root@your_servers_ip

Note: provider should send SSH credentials for the new VPS server via email.


Create new user with adduser command:

adduser user


System open interactive shell and will offer you to set some data:

root…
Top button