Setup
bin/kafka-topics.sh \
--zookeeper zookeeper.example.com:2181 \
--create \| # 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'); |
| # vim:ft=zsh ts=2 sw=2 sts=2 | |
| # | |
| # agnoster's Theme - https://gist.github.com/3712874 | |
| # A Powerline-inspired theme for ZSH | |
| # | |
| # # README | |
| # | |
| # In order for this theme to render correctly, you will need a | |
| # [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts). | |
| # Make sure you have a recent version: the code points that Powerline |
| #!/bin/bash | |
| CHANNEL="#general" | |
| USERNAME="MyBot" | |
| EMOJI=":ghost:" | |
| MSG=$1 | |
| PAYLOAD="payload={\"channel\": \"$CHANNEL\", \"username\": \"$USERNAME\", \"text\": \"$MSG\", \"icon_emoji\": \"$EMOJI\"}" | |
| HOOK=https://hooks.slack.com/services/T00000000/XXXXYYYZ/XXXXXXXX |