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, co...
09:56:12, 15 Aug 2024
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.58.1from
13:06:57, 13 May 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
wget 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)do...
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), и, как следс...
20:53:53, 20 Feb 2024
Playwright, более продвинутая альтернатива SeleniumAndrey Lushnikov — Playwright: Web testing without drama (на русском)Проблемы, из моего опыта, которые есть на Selenium и которые решены в Playwrightфиксация версии браузера - каждая версия Playwright привязана к конкретным версиям браузеров(Chrome, Firefox, Safari) (конечно, их можно поменять). На Linux, на котором у нас бегают Gitlab CI зачастую...
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 de...
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 \ ...
12:28:58, 2 Dec 2023
Clipboard Indicatorhttps://extensions.gnome.org/extension/779/clipboard-indicator/
21:27:34, 30 Nov 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 ...
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 Recordin...
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Слишком много движущихся частей, над...
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() { ...
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 ...
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 pr...
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...
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 { traceReq...
14:11:29, 19 May 2023
Codepackage mainimport "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) { f...
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...
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
inxilm_sensorsneofetchLm-sensors в состоянии "из коробки" поддерживает ограниченный набор датчиков, но знает он гораздо больше. Поэтому выполним поиск доступных датчиков командой:sensors-detectПоследовательно отвечаем на вопросы и смотрим какие еще датчики обнаружила программа, в нашем случае нашелся...Температура накопителей через Smartmontools и HddtempКлассические диски с интерфейсом SA...
13:29:14, 19 May 2023
vim ~/.bashrc# after the adding export PATH="$PATH:$HOME/bin"source <(kubectl completion bash)
13:27:42, 19 May 2023
Скандальное интервью Илона Маска с BBC + вырезанные сцены На русскомИлон Маск и Такер Карлсон ИИ, TruthGPT, Твиттер, крах банковской системы---Elon Musk Tucker Carlson
12:01:55, 19 May 2023
How to download .m3u8 in once timeffmpeg -i "https://example.com/chunklist.m3u8" -codec copy '/absolute/path/to/the/file.mp4'RuTUBEffmpeg -i "https://89.191.239.207:443/hls-vod/gG19CfbCKb2Oh_QEK3Pq1g/1683616363/1784/0x5000c500c965fdae/9279532d58c04c19b396ff6a28634284.mp4.m3u8?i=1920x1080_3236" -http_proxy 'http://localhost:9010' -codec copy '/home/nkonev/Videos/...
22:31:33, 15 May 2023
vim ~/.config/user-dirs.dirslinkFedora Linux
02:14:32, 14 May 2023