- version 3.6
Check those constraints:
$this->anything()
" Copyright 2022 Igor Burago. Distributed under the ISC License terms. | |
" Simple emulation of indentation guides. | |
" | |
" For tab-based indentation, using the 'listchars' option works fine. | |
" For space-based indentation, one can either: | |
" • use the match highlighting feature (see ':help match-highlight'), | |
" as shown in ToggleMatchHighlightIndentGuides(); or | |
" • use the 'leadmultispace' setting of the 'listchars' option (added | |
" in Vim 9.0), as shown in ToggleListCharsIndentGuides(). |
# | |
# Run as root | |
# $ bash <(curl -s https://raw.github.com/gist/1631411) | |
# | |
# Update, upgrade and install development tools: | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install build-essential git-core curl \ | |
libssl-dev \ |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
# /bin/bash | |
# Opens the github page for the current git repository in your browser | |
# https://github.com/jasonneylon/dotfiles/ | |
giturl=$(git config --get remote.origin.url) | |
if [ "$giturl" == "" ] | |
then | |
echo "Not a git repository or no remote.origin.url set" | |
exit 1; |
#!/bin/bash | |
## Update fail2ban iptables with globally known attackers. | |
## Actually, runs 100% independently now, without needing fail2ban installed. | |
## | |
## /etc/cron.daily/sync-fail2ban | |
## | |
## Author: Marcos Kobylecki <fail2ban.globalBlackList@askmarcos.com> | |
## http://www.reddit.com/r/linux/comments/2nvzur/shared_blacklists_from_fail2ban/ |
package main | |
// Generate RSA signing files via shell (adjust as needed): | |
// | |
// $ openssl genrsa -out app.rsa 1024 | |
// $ openssl rsa -in app.rsa -pubout > app.rsa.pub | |
// | |
// Code borrowed and modified from the following sources: | |
// https://www.youtube.com/watch?v=dgJFeqeXVKw | |
// https://goo.gl/ofVjK4 |
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> --describe
Note 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.