Skip to content

Instantly share code, notes, and snippets.

@akopdev
akopdev / Iphone VPN
Created August 20, 2019 11:27
Как установить VPN
wget https://git.io/vpnsetup -O vpnsetup.sh && sudo sh vpnsetup.sh
@akopdev
akopdev / .gitignore
Last active January 27, 2020 14:06
Bitrix Framework
/bitrix/*
!/bitrix/components
/bitrix/components/bitrix/
!/bitrix/php_interface/
/bitrix/php_interface/dbconn.php
/bitrix/php_interface/*.bak
!/bitrix/templates/
!/bitrix/activities
/bitrix/activities/bitrix/
/local/php_interface/dbconn.php
@akopdev
akopdev / python-systemd.md
Last active February 19, 2020 05:21
Autoload python application on Ubuntu using systemd

1. Create *.service file

cd /etc/systemd/system
sudo nano app.service

2. Define service params

[Unit]
@akopdev
akopdev / bitrix-env-install.md
Last active June 5, 2020 13:31
Installing Bitrix Environment for CentOS

Deploy Bitrix24 on CentOS 7+

wget http://repos.1c-bitrix.ru/yum/bitrix-env.sh
chmod +x bitrix-env.sh 
./bitrix-env.sh

Allow to access following TCP ports

| Port | Description |

@akopdev
akopdev / git-reset-author.sh
Last active February 15, 2023 22:51 — forked from bgromov/git-reset-author.sh
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Akop Kesheshyan'
GIT_AUTHOR_EMAIL='hello@akop.dev'
GIT_COMMITTER_NAME='Akop Kesheshyan'
GIT_COMMITTER_EMAIL='hello@akop.dev'
" HEAD
@akopdev
akopdev / fix-unittest-asserts.sh
Created March 9, 2023 11:15
Flake8: Use a regular assert instead of unittest-style '{assertion}'
#!/bin/bash
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# PT009 use a regular assert instead of unittest-style '{assertion}'
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# - to enforce the assertion style recommended by pytest
# - to make use of pytest's assertion rewriting
find tests/ -type f -name "test_*.py" -exec sed -i -E 's/self\.assertFalse\((.*)\)/assert not \1/g' {} \;
find tests/ -type f -name "test_*.py" -exec sed -i -E 's/self\.assertTrue\((.*)\)/assert \1/g' {} \;
find tests/ -type f -name "test_*.py" -exec sed -i -E 's/self\.assertEqual\(([^,]*), (.*)\)$/assert \1 == \2/g' {} \;
@akopdev
akopdev / docker-compose.yml
Created February 9, 2024 19:53
Kafka cluster without zookeeper
version: '3'
services:
kafka-1:
image: 'bitnami/kafka:3.3.1'
container_name: kafka-1
environment:
- KAFKA_ENABLE_KRAFT=yes
- KAFKA_CFG_PROCESS_ROLES=broker,controller
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
@akopdev
akopdev / host_apt_repo_on_github.md
Created January 10, 2025 13:56 — forked from ikbelkirasan/host_apt_repo_on_github.md
Host an APT repository on Github

Host an APT repository on Github

This guide will help you host an APT repository on Github.

Prerequisites

You need to install the following packages.

  • reprepro