Setup
bin/kafka-topics.sh \
--zookeeper zookeeper.example.com:2181 \
--create \| $ mysql -u root -p | |
| SET global net_buffer_length=1048576; --Set network buffer length to a large byte number | |
| SET global max_allowed_packet=1073741824; --Set maximum allowed packet size to a large byte number | |
| SET foreign_key_checks = 0; --Disable foreign key checking to avoid delays,errors and unwanted behaviour | |
| source file.sql --Import your sql dump file | |
| SET foreign_key_checks = 1; --Remember to enable foreign key checks when procedure is complete! |
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
| /* -------------------------------------------------------------------------- */ | |
| // All Bootstrap 4 Sass Mixins [Cheat sheet] | |
| // Updated to Bootstrap v4.4.x | |
| // @author https://anschaef.de | |
| // @see https://github.com/twbs/bootstrap/tree/master/scss/mixins | |
| /* -------------------------------------------------------------------------- */ | |
| // Grid variables | |
| $grid-columns: 12; | |
| $grid-gutter-width: 30px; |
Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups command.
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describeNote the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.
| #!/bin/bash | |
| # proxvm | |
| # Output in specifed format (default csv) all virtual machines on proxmox 4+ | |
| SERVER=localhost | |
| USERNAME=apiread@pve | |
| PASSWORD=123456 | |
| FORMAT=csv | |
| while [[ $# > 0 ]]; do | |
| key="$1" |
| public function index(Request $request) | |
| { | |
| $sortBy = 'id'; | |
| $orderBy = 'desc'; | |
| $perPage = 20; | |
| $q = null; | |
| if ($request->has('orderBy')) $orderBy = $request->query('orderBy'); | |
| if ($request->has('sortBy')) $sortBy = $request->query('sortBy'); | |
| if ($request->has('perPage')) $perPage = $request->query('perPage'); |
| #!/usr/bin/env sh | |
| # ================================================================================================ | |
| # INSTALL GOLANG | |
| # ================================================================================================ | |
| export DEBIAN_FRONTEND=noninteractive | |
| apt-get update | |
| apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install --no-install-recommends \ | |
| g++ \ |
| version: '3.5' | |
| services: | |
| app: | |
| image: swarmpit/swarmpit:latest | |
| environment: | |
| - VERSION=${DOCKER_VERSION:-19.03.2} | |
| - SWARMPIT_DB=http://db:5984 | |
| - SWARMPIT_INFLUXDB=http://influxdb:8086 | |
| - INTERACTIVE=0 |