Get current Unix timestamp$ date +%s
1771238416Parse Unix timestamp$ date -d @1771238416
Mon Feb 16 01:40:16 PM MSK 2026
10:41:09, 16 Feb 2026
We're going to create a cluster with 2 worker nodes and see the distribution one query on multiple tasksOpen 4 terminalsin the zerothdocker network create citus-netin the firstdocker run --rm --name citus-1 --network citus-net --hostname citus-1 -p 5501:5432 -e POSTGRES_PASSWORD=postgresqlPassword citusdata/citus:12.1.6-alpinein the seconddocker run --rm --name citus-2 --network citus-net --hostname citus-2 -p 5502:5432 -e POSTGRES_PASSWORD=postgresqlPassword citusdata/citus:12.1.6-alpinein the thirddoc
17:39:58, 4 Feb 2025
Всем привет, я - Конев Никита, пишу на Golang / Java / Kotlin, вот моё резюме на Хабр Карьере, а это мой пет-проект (исходники на GitHub и Gitflic).Обо мнеАвтор и мейнтейнер библиотеки multipart-spring-graphql, доступной на Maven centralАвтор и мейнтейнер библиотеки r2dbc-migrate, пост в моём блоге, доступной на Maven centralМейнтейнер форка библиотеки распредёлённого cron dcron.Пишу бэкенд на Golang / Java / Kotlin в одной е-коммерс компании.Рекомендую также почитатьНеочевидные боли многопоточности JavaПоп
20:13:43, 6 Jan 2025
Just disablesudo systemctl --global mask tracker-miner-fs-3.service
sudo systemctl --global mask tracker-miner-fs-3.servicefrom herebug
00:18:30, 13 Nov 2024
sudo dnf install java-21-openjdk java-21-openjdk-devel
sudo update-alternatives --config java
sudo update-alternatives --config javac
12:41:58, 30 Oct 2024
YADRO Go Meetup: безопасный DSL для ваших сервисов, выразительные тесты и отладка на проде...ловите записи с таймкодами на Youtube, Rutube или VK Видео.---Golang debugging CEL
15:04:10, 30 Sep 2024
PostgreSQL. Добавляем not null constraints в большие таблицыIn PostgreSQL 12 (and above) scan the entire table is not the only option. alter table set not null can prove correctness of NOT NULL by existing check constraints. So, one can do:-- short-time exclusive lock
alter table foos
add constraint foos_not_null
check (bar1 is not null) not valid;
-- seqscan, but without exclusive lock, concurrent sessions can read/write
alter table foos validate constraint foos_not_null;
-- exclusive lock, but foo
09:56:12, 15 Aug 2024
Query DNS TXTdig -t txt +short chat.nkonev.nameFlush Linux DNS cachesudo systemd-resolve --flush-cachesShow DNSessystemd-resolve --status
19:16:08, 10 May 2024
List all the versionswget https://go.dev/dl/go1.22.0.linux-amd64.tar.gzmkdir -p /home/nkonev/apps/go122tar -C /home/nkonev/apps/go122 -xvf go1.22.0.linux-amd64.tar.gzvim ~/.bashrcexport GOPATH=/home/nkonev/goexport GOROOT=/home/nkonev/apps/go122/goexport PATH="$PATH:$GOROOT/bin:$GOPATH/bin"
23:54:55, 2 Mar 2024
As we know, since 3.7 the official Kafka image appeared.Here is putted together config, based on the previous one.Also having in mind necessary replication factor and ISR settings to have ability to run single node (by default you need to run 3 nodes).Also having in mind that Kafka uses bootstrap mechanism which provides actual servers, so we need to declare them (PLAINTEXT_HOST in config below)docker-compose.ymlversion: '3.7'
services:
kafka:
image: apache/kafka:3.7.0
# image: huecker.io
07:58:51, 27 Feb 2024
На протяжении долгого времени, исторически, Java-разработчики пользовались стеком Spring Cloud для микросервисов.В 2017-19, когда я работал в одном банке, мы использовали следующие части стека Spring Cloud:* Spring Cloud Consul для Service Discovery* Spring Cloud (Open)Feign для декларативных клиентов* Spring Cloud Sleuth для трассировки.У нас тогда изначально не было Kubernetes(k8s), и, как следствие его DNS-based service discovery, поэтому мы использовали Consul и Spring Cloud Consul, интегрированный с Sp
20:53:53, 20 Feb 2024
Playwright, более продвинутая альтернатива SeleniumAndrey Lushnikov — Playwright: Web testing without drama (на русском)Проблемы, из моего опыта, которые есть на Selenium и которые решены в Playwrightфиксация версии браузера - каждая версия Playwright привязана к конкретным версиям браузеров(Chrome, Firefox, Safari) (конечно, их можно поменять). На Linux, на котором у нас бегают Gitlab CI зачастую в репозиториях версии браузеров обновляются, и нужной может не оказаться (да и для Windows непросто скачать про
07:24:10, 15 Feb 2024
GolangLogrocket - How to use Go channels---Getting value from coroutine via pointerpackage mainimport ( "context" log "github.com/sirupsen/logrus" "golang.org/x/sync/errgroup" "os" "time")func init() { // Log as JSON instead of the default ASCII formatter. log.SetFormatter(&log.TextFormatter{ FullTimestamp: true, }) // Output to stdout instead of the default stderr // Can be any io.Writer, see below for File example log.SetOutput(os.Stdout) // Only log the warnin
06:51:57, 6 Dec 2023
https://nightlies.apache.org/flink/flink-docs-release-1.18/docs/try-flink/local_installation/https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/resource-providers/standalone/docker/cat << EOF > /tmp/input.txt Lorem imsum loremEOFdocker network create flink-networkStart JobManagerexport FLINK_PROPERTIES="jobmanager.rpc.address: jobmanager"docker run \ --rm \ --name=jobmanager \ --network flink-network \ --publish 8081:8081 \ -v /tmp/input.txt:/tmp/input.txt:z
12:28:58, 2 Dec 2023
Dialog is one of those underrated Linux tools that you wish you knew about a long time ago. You can build a very nice and simple UI that will work perfectly on your terminal.For example, to create a simple checkbox list with my favorite languages, selecting Python by default:dialog --clear --checklist "Favorite programming languages:" 10 30 7 1 \ Python on 2 Java off 3 Bash off 4 Perl off 5 Ruby offlink https://fedoramagazine.org/writing-useful-terminal-tui-on-linux-with-dialog-and-jq/
09:18:57, 30 Nov 2023
Record an audio from browser in Linuxhttps://itsfoss.com/record-streaming-audio/dnf install gnome-sound-recorderThe audio record files are going to appear here:~/.local/share/org.gnome.SoundRecorderThen installhttps://discussion.fedoraproject.org/t/recording-audio-from-browser-or-music-streaming-software-into-audacity/66574dnf install pavucontrolOpen PulseAudio Volume ControlGo to the tab Recording, in bottom right in dropdown choose Show: All StreamsStart the recording via Sound RecorderThe go back to Puls
16:42:17, 31 Oct 2023
Quarkus Insights #131: What’s new with Hibernate 6 and QuarkusSteve Ebersole & Gavin King discuss what's new in Hiberate 6 and it's impact on Quarkus 3.
11:51:09, 15 Aug 2023
Антон Кекс - Что такое Работающий Продукт и как его делатьАльтернативная точка зрения на тестирование продукта 😀 - быстрые тесты - https://www.youtube.com/watch?v=KwPrt17wcZs&t=2586sБесполезные Liquibase и Flyway Maven & Gradle плагины https://youtu.be/KwPrt17wcZs?t=2782Вы должны контролировать ваш продукт, а не он вас https://youtu.be/KwPrt17wcZs?t=2850Слишком много движущихся частей, надёжность страдает, инвестировать время в улучшение, самое простое решение https://youtu.be/KwPrt17wcZs?t=2884Вы о
02:32:32, 6 Aug 2023
Quarkus Insights #117: Contract Testing with Pact and QuarkusJava JVM
15:59:13, 28 May 2023
Run ibus-setup from the terminal (or open IBus Preferences).Go to “Emoji”.Next to “Unicode code point:”, click on the three dots (i.e. ...).In the dialog, click “Delete”, then “OK”.Close the IBus Preferences window.Link 1Link 2Fedora Linux
05:06:45, 28 May 2023
How do you determine if a variable is a slice or array?package mainimport "fmt"import "reflect"func main() { m := make(map[string]interface{}) m["a"] = []string{"a", "b", "c"} m["b"] = [4]int{1, 2, 3, 4} test(m)}func test(m map[string]interface{}) { for k, v := range m { rt := reflect.TypeOf(v) switch rt.Kind() { case reflect.Slice: fmt.Println(k, "is a slice with element type", rt.Elem()) c
17:31:22, 21 May 2023
Display git branch name in bash promptAdd to ~/.bash_profile or ~/.bashrcexport EDITOR=vimparse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'}# export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "function __build_prompt { local EXIT="$?" # store current exit code # define some colors local RESET='\[\e[0m\]' local RED='\[\e[0;31m\]' local GREEN='\[\e[0;32m\]' lo
14:26:58, 19 May 2023
Find port in nginx configs recursivelygrep 8080 --include='*.conf' -r /etc/nginxsed dry-runsed 's/Dimensions/Габариты/' /tmp/woocommerce-ru_RU.po | lessPrint files directories with hidden (.dot-started)nkonev@localhost ~ $ find `pwd` -mindepth 1 -maxdepth 1/home/nkonev/Programming/home/nkonev/Общедоступные/home/nkonev/.ssh/home/nkonev/.cachePrint all arguments passed to all java processesfor j in `pgrep java`; do cat /proc/${j}/cmdline | tr '\0' ' ' echo echodoneFloat-pointed
14:15:55, 19 May 2023
Press e for switch %MEM column to gigabytesPress m tune memory barsPress Z for open color settings, then switch text colors by pressing a, then press Enter for commitPress z for toggle colored outputDouble press m for show memory progressbarPress M for sort by memoryPress c for show full commandlinePress W immediately Enter for save this configuration to diskPress h for read help ;)Useful commands:V (Shift + v) - process treeH (Shift + h) - threadsf - fields/order byY - inspect pid---Linux console terminal
14:14:39, 19 May 2023
LoggingRequestInterceptor.javapublic class LoggingRequestInterceptor implements ClientHttpRequestInterceptor { final static Logger LOGGER = LoggerFactory.getLogger(LoggingRequestInterceptor.class); final static String CHARSET = "UTF-8"; @Override public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException { traceRequest(request, body); ClientHttpResponse response = execution.execute(request, body); traceResponse(respons
14:11:29, 19 May 2023
Codepackage main
import "fmt"
type I interface {
M()
}
type T struct {
S string
}
func (t *T) M() {
if t == nil {
fmt.Println("<nil>")
return
}
fmt.Println(t.S)
}
func main() {
var i I
nullDescribe(i)
var t *T
fmt.Printf("t == nil: %v\n", t == nil)
nullDescribe(t)
i = t
describe(i)
i.M()
describe(t)
t.M()
i = &T{"hello"}
describe(i)
i.M()
}
func describe(i I) {
fmt.Printf("(%v, %T)\n", i, i)
}
func nullDescribe(i I) {
fm
14:08:46, 19 May 2023
dd if=/dev/zero of=/tmp/output bs=8k count=10k; rm -f /tmp/outputfio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=2G --readwrite=randrw --rwmixread=75; rm -rf test;https://askubuntu.com/questions/87035/how-to-check-hard-disk-performance/87036#87036
14:07:43, 19 May 2023
su -usermod -aG wheel yournameThen you should re-loginand check yours groups by typingidYou should see 'wheel' grouplinkFedora Linux
14:06:41, 19 May 2023
0. Given wrong filemanager:Let's fix it.1. Query xdg-mime query default inode/directory2. Set Thunarxdg-mime default thunar.desktop inode/directory application3. Restart IntelliJ IDEALinksStack ExchangeFedora Linux
14:03:56, 19 May 2023
docker system prune -af --volumessu -dnf install ncduncdu /See also
13:59:45, 19 May 2023
JUnit4 + Java@RunWith(SpringRunner.class)@ImportAutoConfiguration(JacksonAutoConfiguration.class)@Import(MyService.class)@ContextConfigurationpublic class MyServiceTest {}The main point here is not to put @SpringTest annotation on MyServiceTest---JUnit5 + Kotlin@Configuration@ComponentScanclass AutotestApplication@ExtendWith(SpringExtension::class)@SpringBootTest( classes = [AutotestApplication::class], webEnvironment = WebEnvironment.NONE)@ImportAutoConfiguration(value=[RabbitAutoConfiguration::class
13:56:50, 19 May 2023
apt update# hostapt install bind9-host# route, netstatapt install net-tools# pingapt install iputils-ping# telnetapt install telnet# tracepathapt install iputils-tracepath# tracerouteapt install traceroute# ss, ip aapt install iproute2# digapt install dnsutils# ps, top, freeapt install procps
13:54:31, 19 May 2023
application.ymllogging: level: org.hibernate.SQL: trace org.hibernate.type.descriptor.sql.BasicBinder: trace org.hibernate.event.internal: trace org.springframework.jdbc.core: debugJava JVM JPA Java Persistence API
13:47:18, 19 May 2023
Add following arguments to your java process-Dcom.sun.management.jmxremote-Dcom.sun.management.jmxremote.authenticate=false-Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote.local.only=false-Dcom.sun.management.jmxremote.port=1099-Dcom.sun.management.jmxremote.rmi.port=1099-Djava.rmi.server.hostname=127.0.0.1Then open VisualVM
13:45:32, 19 May 2023