bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
| curl -s http://api.open-notify.org/iss-now.json | jq '.' |
| smsc2_rout() -> smscconn_usable() | |
| http://doxygen.kannel.org/d3/d05/smscconn_8c.html#aeaca8fdaf047fab86a82ed5890c4ecc3 | |
| Смотрим список живых каналов. | |
| 1. Канал не подходит, если (ret=-1): | |
| - есть allowed-smsc-id, а в сообщении smsc-id не определён или он не был найден | |
| - есть denied-smsc-id, и он полностью совпадает с smsc-id из сообщения | |
| - есть allowed-smsc-id-regex, но в сообщении нет smsc-id или он не совпадает с тем что в сообщении | |
| - есть denied-smsc-id-regex и он совпадает с smsc-id из сообщения |
| wget -q https://registry.hub.docker.com/v1/repositories/gitlab/gitlab-ce/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | awk -F: '{print $3}' | egrep '^12.' |
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
| #!/usr/bin/env python | |
| import os | |
| import re | |
| import sqlite3 | |
| from urllib.parse import unquote | |
| def process(filename): | |
| connection = sqlite3.connect(f'{filename}') |
| bits='000011100010110100011011000011100010111100101011000011100010111000011111000011100010111000101111000011100010111100011001000011100010111000101110000011100010111000011100000011100010111100011001000011100010111000011001000011100010111000101100000011100010111000101100000011100010111000100001000011100010111100011010000011100010111100011011' | |
| _bytes = [ int(bits[k:k+8],2) for k in range(0, len(bits), 8)] | |
| for i in range(0, len(_bytes), 3): | |
| byte1, byte2 = _bytes[i+1:i+3] | |
| c = ((byte1 & 0x0f) << 4) | (byte2-0x20 if byte2 > 0x22 else byte2-0x19) | |
| print(c.to_bytes(1, byteorder='little').decode('cp1251'), end="") |
| # Original was taken from https://web.archive.org/web/20200611074334/https://success.docker.com/article/how-to-completely-remove-docker-in-windows-10 | |
| $ErrorActionPreference = "SilentlyContinue" | |
| kill -force -processname 'Docker for Windows', com.docker.db, vpnkit, com.docker.proxy, com.docker.9pdb, moby-diag-dl, dockerd | |
| try { | |
| ./MobyLinux.ps1 -Destroy | |
| } Catch {} |
docker ps -a -q -f status=exited | xargs --no-run-if-empty docker rm -v
docker images -f "dangling=true" -q | xargs --no-run-if-empty docker rmi
docker images | awk '/ago/ { print $3}' | xargs --no-run-if-empty docker rmi
| DGS-3120-24TC:admin#disable clipaging | |
| Command: disable clipaging | |
| Success. | |
| DGS-3120-24TC:admin#show ports | |
| Command: show ports | |
| Port State/ Settings Connection Address | |
| MDIX Speed/Duplex/FlowCtrl Speed/Duplex/FlowCtrl Learning |
| null@MacBook-Air-Denis [23:33:10] [~/netmiko/tests] [dlink *] | |
| -> % py.test -v test_netmiko_config.py --test_device dlink_ds | |
| ============================================================= test session starts ============================================================= | |
| platform darwin -- Python 3.8.0, pytest-5.3.4, py-1.8.1, pluggy-0.13.1 -- /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 | |
| cachedir: .pytest_cache | |
| rootdir: /Users/null/netmiko, inifile: setup.cfg | |
| collected 7 items | |
| test_netmiko_config.py::test_ssh_connect PASSED [ 14%] | |
| test_netmiko_config.py::test_enable_mode PASSED [ 28%] |