Skip to content

Instantly share code, notes, and snippets.

Building Python 3.11

This article focuses on building CPython for common Linux server operating systems.

These scripts will be tested in fresh Docker container.

I'll install dependencies from package manager if possible, or I'll try compile myself if that makes sense.

The dependencies doesn't change much between these CPython versions, so Python 3.12 and 3.10

@iruslanalexan
iruslanalexan / cheatsheet.md
Created October 21, 2022 14:04 — forked from masklinn/cheatsheet.md
launchctl/launchd cheat sheet

I've never had great understanding of launchctl but the deprecation of the old commands with launchctl 2 (10.10) has been terrible as all resources only cover the old commands, and documentation for Apple utilities is generally disgracefully bad, with launchctl not dissembling.

Mad props to https://babodee.wordpress.com/2016/04/09/launchctl-2-0-syntax/ which contains most details

domains

Internally, launchd has several domains, but launchctl 1 would only ask for service names,

@iruslanalexan
iruslanalexan / xhprof-xhgui-nginx-php-fpm-docker.md
Created October 18, 2021 10:14 — forked from rija/xhprof-xhgui-nginx-php-fpm-docker.md
Configuring xhprof and xhgui for a multi-containers setup (nginx/php-fpm)
@iruslanalexan
iruslanalexan / rabbitmq_cheatsheet_ru.md
Created September 2, 2021 07:59 — forked from kyptov/rabbitmq_cheatsheet_ru.md
RabbitMQ Cheat Sheet (russian)

Общие упрощенные понятия. Возможно существуют способы задать другое поведение нежели данное упощенное.

Понятия

  • producer - отправитель, программный код, который отправляет сообщение.
  • consumer - получатель, программный код, который должен получить сообшение.
  • exchange - обменник, функционал RabbitMQ, получает сообщение с заданными параметрами от отправителя и:
    • может сбросить(удалить) сообщение или вернуть отправителю (зависит от атрибутов сообщения),
    • может отправить сообщение в очередь,
    • может отправить сообщение в несколько очередей (сообщение будет скопировано для каждой очереди)
  • queue - очередь, функционал RabbitMQ, хранит все сообщения и раздает их получателям.
  • message - сообщение, содержит атрибуты необходимые RabbitMQ, а также данные для передачи от отправителя к получателю
@iruslanalexan
iruslanalexan / book_reciever.php
Last active August 12, 2021 14:23 — forked from mamontov-cpp/rabbitmqreceiver.php
rabbitmqreceiver.php
<?
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
require_once __DIR__ . '/vendor/autoload.php';
use PhpAmqpLib\Connection\AMQPStreamConnection;
$connection = new AMQPStreamConnection('192.168.1.139', 5672, 'localconnect', 'localconnect');
$channel = $connection->channel();

FAQ: JetBrains PHPStorm

Как убрать подсказки перед параметрами вызовов методов в PHPStorm 2017.2?

  • Меню File > Settings > Editor > General > Appearance > "Show parameter name hint" или ПКМ на подсказке

Изменение размера шрифта в терминале

  • Editor > Colors & Fonts > Scheme > Save As... (можно изменять только копию схемы)
  • Editor > Colors & Fonts > Console Font > Size (изменяем на нужный размер) > Ok (Apply)

Отображение пробелов, табуляции в окне редактора

# remove specific file from git cache
git rm --cached filename
# remove all files from git cache
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
@iruslanalexan
iruslanalexan / restart coreaudio daemon
Created July 22, 2021 10:06 — forked from felipecsl/restart coreaudio daemon
Restart Mac OS X coreaudio daemon. Useful if you cannot change the audio output device to Airplay.
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`
# or...
sudo killall coreaudiod
@iruslanalexan
iruslanalexan / bitrix.sh
Created February 4, 2021 06:37 — forked from morsvox/bitrix.sh
bash script for bitrix optim
#!/bin/sh
cd $HOME/public_html/local/templates/oknapolis
gulp
echo "upload optimize"
cd $HOME/public_html/upload/
find -type f -iname "*.jpg" -exec jpegoptim --strip-all --all-progressive -pm85 {} \;
echo "build optimize"
cd $HOME/public_html/local/templates/oknapolis/build/images/
find -type f -iname "*.jpg" -exec jpegoptim --strip-all --all-progressive -pm85 {} \;