mkdir -p ~/.zsh/completions
wget -q https://raw.githubusercontent.com/saltstack/salt/master/pkg/salt.zsh -O ~/.zsh/completions/_salt
sed -i'' -e 's/python2/python/' ~/.zsh/completions/_salt
# ~/.zshrc
# https://twitter.com/SaltTips/status/1308079610555494403 | |
function sj() { | |
if [ $# -lt 2 ]; then echo "Usage: sj MINION 'Jinja string'"; return 1; fi | |
sudo salt "$1" slsutil.renderer default_renderer=jinja string="$2" | |
} |
#!/usr/bin/env python | |
""" | |
Test Yandex Cloud Functions written in Python and invoked as API Gateway integrations locally. | |
Heavily based on https://github.com/amancevice/python-lambda-gateway | |
MIT License | |
Copyright (c) 2020 Alexander Mancevice | |
Copyright (c) 2022-2023 Max Arnold |
#!/usr/bin/env python | |
import os | |
import asyncio | |
import ydb | |
JOB_DDL = """ | |
CREATE TABLE job ( | |
id String NOT NULL, | |
status String, |
#!/usr/bin/env python3 | |
import argparse | |
import ast | |
import os | |
import sys | |
def parse_module(mod): | |
with open(mod, "r") as source: |
ssh
and roster
arguments https://docs.saltproject.io/en/master/ref/states/all/salt.states.saltmod.html#salt.states.saltmod.statesalt \* state.apply
. This is quite important feature for those who are against running any management agents# Based on https://cloud.yandex.ru/ru/docs/speechkit/stt/api/microphone-streaming | |
import pyaudio | |
import wave | |
import argparse | |
import grpc | |
from datetime import datetime | |
import time | |
import queue | |
import sys |
Here is how I set up my extension development environment on Ubuntu 22.04:
git config --global user.name "Name"
git config --global user.email "email@example.com"
git clone git@github.com:USER/saltext-my.git
cd saltext-my
sudo apt install python3-venv python3-dev build-essential python3-wheel python3-wheel-whl
python3 -m venv .venv
source .venv/bin/activate