-
Create an empty file to prevent the service from starting
sudo touch /etc/cloud/cloud-init.disabled
Общие упрощенные понятия. Возможно существуют способы задать другое поведение нежели данное упощенное.
- producer - отправитель, программный код, который отправляет сообщение.
- consumer - получатель, программный код, который должен получить сообшение.
- exchange - обменник, функционал RabbitMQ, получает сообщение с заданными параметрами от отправителя и:
- может сбросить(удалить) сообщение или вернуть отправителю (зависит от атрибутов сообщения),
- может отправить сообщение в очередь,
- может отправить сообщение в несколько очередей (сообщение будет скопировано для каждой очереди)
- queue - очередь, функционал RabbitMQ, хранит все сообщения и раздает их получателям.
- message - сообщение, содержит атрибуты необходимые RabbitMQ, а также данные для передачи от отправителя к получателю
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Useful celery config. | |
app = Celery('tasks', | |
broker='redis://localhost:6379', | |
backend='redis://localhost:6379') | |
app.conf.update( | |
CELERY_TASK_RESULT_EXPIRES=3600, | |
CELERY_QUEUES=( | |
Queue('default', routing_key='tasks.#'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# You may override default target user with -e user=someotheruser | |
# It is mandatory to choose a strong password! At least consult with https://www.bennish.net/password-strength-checker/ | |
- name: change linux user password | |
hosts: [all] | |
gather_facts: no | |
vars_prompt: | |
## use this when 656K rounds will be OK for your servers' CPU performance, or when rounds number will become configurable in ansible | |
# You may need 'apt-get install python-passlib' or 'pip install passlib' for vars_prompt encryption |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#This script will compile and install a static ffmpeg build with support for nvenc un ubuntu. | |
#See the prefix path and compile options if edits are needed to suit your needs. | |
#for ubuntu 19.04 | |
#install required things from apt | |
installLibs(){ | |
echo "Installing prerequisites" | |
sudo apt-get update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# My tmux configuration, partly based on https://github.com/wbkang/wbk-stow/blob/master/tmux-config/.tmux.conf | |
# Scroll History | |
set -g history-limit 50000 | |
# show messages for 4 seconds instead | |
set -g display-time 4000 | |
# set first window to index 1 (not 0) to map more to the keyboard layout | |
set-option -g renumber-windows on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# NOTE: This will let anyone who belongs to the 'pcap' group | |
# execute 'tcpdump' | |
# NOTE2: User running the script MUST be a sudoer. It is | |
# convenient to be able to sudo without a password. | |
sudo groupadd pcap | |
sudo usermod -a -G pcap $USER |
References:
From man page: man apt_preferences