<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>David Leibovych</title><link>https://www.dleibovych.com/</link><description>Recent content on David Leibovych</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Fri, 11 Jul 2025 20:42:18 +0300</lastBuildDate><atom:link href="https://www.dleibovych.com/index.xml" rel="self" type="application/rss+xml"/><item><title>My Setup 2025</title><link>https://www.dleibovych.com/posts/my-setup-2025/</link><pubDate>Fri, 11 Jul 2025 20:42:18 +0300</pubDate><guid>https://www.dleibovych.com/posts/my-setup-2025/</guid><description>&lt;h3 id="the-journey">The Journey&lt;/h3>
&lt;p>In the last year or so, under the influence of &lt;a href="https://www.youtube.com/@ThePrimeTimeagen">some bloggers&lt;/a> I have started learning vim motions. My primary editor of choise at the time were some JetBrains products + VsCode.&lt;/p>
&lt;h4 id="jetbrains">JetBrains&lt;/h4>
&lt;p>JetBrains support for vim motions is extensive via the &lt;a href="https://plugins.jetbrains.com/plugin/164-ideavim">ideavim&lt;/a> plugin, which adds support for all the motions you would need and even provides a handy .ideavimrc config file to tinker with. With the power of that, one could map every IDE action into a vim key binding, and finally &lt;del>achieve enlightenment&lt;/del> use the IDE without needing to ever touch the mouse.&lt;/p></description></item><item><title>Tmux as Docker</title><link>https://www.dleibovych.com/posts/tmux-as-docker/</link><pubDate>Sat, 08 Mar 2025 21:29:03 +0000</pubDate><guid>https://www.dleibovych.com/posts/tmux-as-docker/</guid><description>&lt;p>I highly recommend using a vps with a custom domain name and https configuration for testing ones backend. 127.0.0.1 is fine for start, and there is not a way of avoiding it, however, having an actual server is bound to uncover some obvious issues that were missed in development.&lt;/p>
&lt;p>But there is an issue at hand: how to keep the backend code running after the ssh connection is lost? There are a few options.&lt;/p></description></item><item><title>Knowledge was collected 7</title><link>https://www.dleibovych.com/posts/knowledge-was-collected-7/</link><pubDate>Thu, 27 Feb 2025 10:49:10 +0200</pubDate><guid>https://www.dleibovych.com/posts/knowledge-was-collected-7/</guid><description>&lt;h4 id="the-opposite-of-documentation-is-superstition">The Opposite of Documentation is Superstition&lt;/h4>
&lt;p>&lt;a href="https://buttondown.com/hillelwayne/archive/the-opposite-of-documentation-is-superstition/">https://buttondown.com/hillelwayne/archive/the-opposite-of-documentation-is-superstition/&lt;/a>&lt;/p>
&lt;p>This is a fun story about how the lack of documentation leads people to try out different options to make the tool work, even though it has nothing to do with how the tool is actually working.&lt;/p>
&lt;p>The story features an experiment done on some birds to &amp;ldquo;trigger the feeder&amp;rdquo;, where the birds where fed at random but developed random superstitions they thought were the triggers for food (they weren&amp;rsquo;t) &lt;a href="https://en.wikipedia.org/wiki/B._F._Skinner">wiki&lt;/a>&lt;/p></description></item><item><title>Knowledge was collected 6</title><link>https://www.dleibovych.com/posts/knowledge-was-collected-6/</link><pubDate>Mon, 30 Dec 2024 15:59:32 +0200</pubDate><guid>https://www.dleibovych.com/posts/knowledge-was-collected-6/</guid><description>&lt;p>A little &amp;ldquo;Holiday edition&amp;rdquo; knowledge collection.&lt;/p>
&lt;h4 id="limbo">Limbo&lt;/h4>
&lt;p>&lt;a href="https://github.com/tursodatabase/limbo">https://github.com/tursodatabase/limbo&lt;/a>&lt;/p>
&lt;p>I already talked about Turso a few times before while collecting some knowledge, but they never ceize to amaze!
They are rewriting SQLite in Rust now! More Rust! More!&lt;/p>
&lt;h4 id="why-cant-we-make-simple-software">Why can&amp;rsquo;t we make simple software&lt;/h4>
&lt;p>&lt;a href="https://www.youtube.com/watch?v=czzAVuVz7u4">https://www.youtube.com/watch?v=czzAVuVz7u4&lt;/a>&lt;/p>
&lt;p>As much as I&amp;rsquo;d like to advocate for software simplicity, not overthinking, &amp;ldquo;You Ain&amp;rsquo;t Gonna Need It&amp;rdquo; etc, that&amp;rsquo;s not really a thing. With the need to support a million platforms, CPU architectures, screen sizes, input devices/options, network connectivity, storage, different communication protocols and millons of more things software will get complex. A great talk showcasing why simple software is not really a possibility.&lt;/p></description></item><item><title>Knowledge was collected 5</title><link>https://www.dleibovych.com/posts/knowledge-was-collected-5/</link><pubDate>Wed, 11 Dec 2024 18:47:27 +0200</pubDate><guid>https://www.dleibovych.com/posts/knowledge-was-collected-5/</guid><description>&lt;p>&lt;a href="https://adventofcode.com">Advent of Code&lt;/a> is still going on. Go check it out!&lt;/p>
&lt;h4 id="how-neovim-made-me-a-better-developer">&amp;ldquo;How Neovim Made Me a Better Developer&amp;rdquo;&lt;/h4>
&lt;p>&lt;a href="https://www.youtube.com/watch?v=5u604lTkGAY">https://www.youtube.com/watch?v=5u604lTkGAY&lt;/a>&lt;/p>
&lt;p>Decpite the name, this talk is not about Neovim. Teej Devries is a core contributor of Neovim and created many useful plugins for the editor, and here he is talking about how working on it made him better. Believe it or not - it&amp;rsquo;s not the motions.&lt;/p>
&lt;h4 id="buttplugio">buttplug.io&lt;/h4>
&lt;p>&lt;a href="https://github.com/buttplugio/buttplug">https://github.com/buttplugio/buttplug&lt;/a>&lt;/p>
&lt;p>Yes. You read it right. It is also ironically written in Rust. I love Rust just for that.&lt;/p></description></item><item><title>Knowledge was collected 4</title><link>https://www.dleibovych.com/posts/knowledge-was-collected-4/</link><pubDate>Thu, 05 Dec 2024 19:19:52 +0200</pubDate><guid>https://www.dleibovych.com/posts/knowledge-was-collected-4/</guid><description>&lt;h4 id="advent-of-code">Advent of Code&lt;/h4>
&lt;p>&lt;a href="https://adventofcode.com/">https://adventofcode.com/&lt;/a>&lt;/p>
&lt;p>You know I had to mention this one. It is incredible. Play Advent of Code.
As of today we are on day 5 and it is incredibly fun!&lt;/p>
&lt;h4 id="advent-of-code-behind-the-scenes">Advent of Code: Behind the Scenes&lt;/h4>
&lt;p>&lt;a href="https://www.youtube.com/watch?v=uZ8DcbhojOw">https://www.youtube.com/watch?v=uZ8DcbhojOw&lt;/a>&lt;/p>
&lt;p>Advent of Code again? Yes.&lt;/p>
&lt;p>This is a cool video from the creator of this fun advent talking about behind the scenes: how the puzzles are created and verified.&lt;/p></description></item><item><title>Knowledge was collected 3</title><link>https://www.dleibovych.com/posts/knowledge-was-collected-3/</link><pubDate>Thu, 28 Nov 2024 17:01:05 +0200</pubDate><guid>https://www.dleibovych.com/posts/knowledge-was-collected-3/</guid><description>&lt;p>Lets bring a little fun on the holiday.&lt;/p>
&lt;h4 id="play-trumpet-with-your-keyboard">Play trumpet with your keyboard.&lt;/h4>
&lt;p>&lt;a href="https://www.youtube.com/watch?v=xa17zHJhNhA">https://www.youtube.com/watch?v=xa17zHJhNhA&lt;/a>&lt;/p>
&lt;p>This is exactly what it seems. You press numbers. Notes get played. Very fun.&lt;/p>
&lt;h4 id="someone-was-a-vscode-early-adopter-with-no-git-knowledge">Someone was a vscode early adopter (with no git knowledge)&lt;/h4>
&lt;p>&lt;a href="https://github.com/microsoft/vscode/issues/32405">https://github.com/microsoft/vscode/issues/32405&lt;/a>&lt;/p>
&lt;p>Old but gold. Someone decided to try vscode in 2017, did not want to save their changes, pressed discard in the vcs window. &lt;strong>EVERYTHING WAS DELETED!&lt;/strong>&lt;/p>
&lt;p>A story better told on Halloween.&lt;/p></description></item><item><title>Find the egg</title><link>https://www.dleibovych.com/posts/find-the-egg/</link><pubDate>Sun, 24 Nov 2024 22:24:28 +0200</pubDate><guid>https://www.dleibovych.com/posts/find-the-egg/</guid><description>&lt;p>I made a silly little game in a few minutes fith my son. He just wanted to play a little more &amp;ldquo;Hollow Knight&amp;rdquo; and I just wanted to direct that into something more creative and useful. So we came up with this silly game idea - &amp;ldquo;Find the Egg!&amp;rdquo;. It would just show a little grid and you&amp;rsquo;d have to guess where on the grid the egg is.&lt;/p>
&lt;p>&lt;strong>Grid&lt;/strong>&lt;/p>
&lt;pre tabindex="0">&lt;code># # #
# # #
# # #
&lt;/code>&lt;/pre>&lt;p>&lt;strong>No egg&lt;/strong>&lt;/p></description></item><item><title>KNOWLEDGE WAS COLLECTED #2</title><link>https://www.dleibovych.com/posts/knowledge-was-collected-2/</link><pubDate>Fri, 22 Nov 2024 20:31:04 +0200</pubDate><guid>https://www.dleibovych.com/posts/knowledge-was-collected-2/</guid><description>&lt;h4 id="redwood">Redwood&lt;/h4>
&lt;p>&lt;a href="https://github.com/cashapp/redwood">https://github.com/cashapp/redwood&lt;/a>&lt;/p>
&lt;p>Another developer I adore deeply since my Android days - Jake Wharton, is trying to make every platform more like android (for better or for worse). There are lots of different ways to make cross-platform applications, and Jake is trying to adapt the reactive kotlin UI (Compose). I am yet to try this (as many other things), but I trust Jake to create something solid.&lt;/p>
&lt;h4 id="motion">Motion&lt;/h4>
&lt;p>&lt;a href="https://motion.dev/">https://motion.dev/&lt;/a>&lt;/p>
&lt;p>There is one way to prove to someone that you know UI - stunning animations. While CSS is pretty good at this lately, there are ways to go. Motion lets you animate crazy stuff and make crazy looking websites. Just look at their own! They only supported React till recently, but now promise to support any frameworks or even vanilla JS.&lt;/p></description></item><item><title>Projects</title><link>https://www.dleibovych.com/projects/</link><pubDate>Sat, 16 Nov 2024 23:07:16 +0200</pubDate><guid>https://www.dleibovych.com/projects/</guid><description>&lt;h2 id="anonybit">Anonybit&lt;/h2>
&lt;h3 id="tech-lead-director-of-engineering">Tech lead, Director of Engineering&lt;/h3>
&lt;p>&lt;strong>COMPANY OVERVIEW&lt;/strong>&lt;/p>
&lt;p>Anonybit Inc. provides biometric solutions for companies, including face biometrics, fingerprint and voice detection and similarity calculation&lt;/p>
&lt;p>&lt;strong>RESPONSIBILITIES&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Supported multiple teams to develop biometric storage and sharding solutions.&lt;/li>
&lt;li>Implemented multiple demos with partners to showcase features&lt;/li>
&lt;li>Negotiated with partners to implement features&lt;/li>
&lt;li>Lead development and communications with clients&lt;/li>
&lt;/ul></description></item><item><title>About</title><link>https://www.dleibovych.com/about/</link><pubDate>Fri, 15 Nov 2024 23:30:40 +0200</pubDate><guid>https://www.dleibovych.com/about/</guid><description>&lt;p>Hello! My name is David and I&amp;rsquo;ve been profesionally programming since 2012.&lt;/p>
&lt;p>Most of my career I was making Android applications for companies like Samsung, Megogo and many more, but I am rapidly expanding my knowledge and not limiting myself to any specific technology stack.&lt;/p>
&lt;p>I have created multiple successful projects created with many different technologies, like:&lt;/p>
&lt;ul>
&lt;li>Android SDK&lt;/li>
&lt;li>iOS SDK (Swift UI)&lt;/li>
&lt;li>React&lt;/li>
&lt;li>NextJS&lt;/li>
&lt;li>Python (Django, Flask, FastAPI)&lt;/li>
&lt;li>Golang&lt;/li>
&lt;li>Lua&lt;/li>
&lt;li>and many many more&lt;/li>
&lt;/ul>
&lt;p>Digging deep is my special mantra, I never stop learning and improving. My GitHub is a project graveyard, but every tombstone is an ode to a learned skill.&lt;/p></description></item><item><title>Knowledge was collected #1</title><link>https://www.dleibovych.com/posts/knowledge-was-collected-1/</link><pubDate>Fri, 15 Nov 2024 22:24:09 +0200</pubDate><guid>https://www.dleibovych.com/posts/knowledge-was-collected-1/</guid><description>&lt;h4 id="libsql">libSQL&lt;/h4>
&lt;p>&lt;a href="https://github.com/tursodatabase/libsql">GitHub - tursodatabase/libsql: libSQL is a fork of SQLite that is both Open Source, and Open Contributions.&lt;/a>&lt;/p>
&lt;p>Last week I learned about Turso, a company that provides SQLite as a service. Now I found that they actually open sourced their SQLite fork - libSQL with the MIT license, and it does have some pretty impressive features.&lt;/p>
&lt;ul>
&lt;li>It does have vector support with vector math.&lt;/li>
&lt;li>It also have a feature called sqld - an sqlite backend that allows to split data between multiple sqlite files for ease of access. Now it doesn’t shard data like we do, but it’s still very impressive.&lt;/li>
&lt;/ul>
&lt;h4 id="the-only-unbreakable-law">The only unbreakable law&lt;/h4>
&lt;p>&lt;a href="https://www.youtube.com/watch?v=5IUj1EZwpJY">https://www.youtube.com/watch?v=5IUj1EZwpJY&lt;/a>&lt;/p></description></item><item><title>Full Screen Video in Html</title><link>https://www.dleibovych.com/posts/full-screen-video-html/</link><pubDate>Tue, 20 Feb 2024 09:42:49 +0200</pubDate><guid>https://www.dleibovych.com/posts/full-screen-video-html/</guid><description>&lt;p>I had a task to capture peoples faces for AI biometric recognition for authentication purposes. The &amp;ldquo;hard&amp;rdquo; part supposed to be the face recognition (silly me). There are a bunch of libraries to do that for me, but the &lt;code>video&lt;/code> html tag went out of control.&lt;/p>
&lt;p>The tricky part was to make sure that the video is filling up the screen on desktop, but also on mobile.&lt;/p>
&lt;p>When setting &lt;code>width&lt;/code> and &lt;code>height&lt;/code> to the &lt;code>video&lt;/code> tag via &lt;code>js&lt;/code> - the video looks weirdly out of place.&lt;/p></description></item><item><title>One Day Software Build</title><link>https://www.dleibovych.com/posts/one-day-software-build/</link><pubDate>Mon, 10 Oct 2022 19:23:51 +0300</pubDate><guid>https://www.dleibovych.com/posts/one-day-software-build/</guid><description>&lt;p>There is a website I made for some friends - &lt;a href="https://www.getmanstudio.com">https://www.getmanstudio.com&lt;/a> which lives on a digitalocean droplet. The droplet had multiple uses for me in the past, but lately this website was the only thing living there, and I did not really want to pay the $6/mo for it, so the logical thing for me to do was to move the website.&lt;/p>
&lt;p>It was also quite old, so a little remake wouldn&amp;rsquo;t hurt. Of course, being a constant learner I wanted to use something new and shiny to make that happen. Just recently I heard about two new technologies - nextjs for making websites, and tailwindcss for making pretty websites.&lt;/p></description></item><item><title>Best Crossplatform Email App</title><link>https://www.dleibovych.com/posts/best-crossplatform-email-app/</link><pubDate>Mon, 13 Dec 2021 11:34:05 +0200</pubDate><guid>https://www.dleibovych.com/posts/best-crossplatform-email-app/</guid><description>&lt;p>I have to share this. After long search for a great cross-platform email app I tried&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://www.thunderbird.net/en-US/">Thunderbird&lt;/a>: works great, not so great outlook support.&lt;/li>
&lt;li>&lt;a href="https://bluemail.me/">BlueMail&lt;/a>: meh.&lt;/li>
&lt;/ul>
&lt;p>I finally found the best app, which works great and suits perfectly my needs: &lt;a href="https://getmailspring.com/">Mailspring&lt;/a>.&lt;/p>
&lt;p>Happy emailing!&lt;/p></description></item><item><title>Testing Flutter Bloc</title><link>https://www.dleibovych.com/posts/testing-flutter-bloc/</link><pubDate>Sat, 11 Dec 2021 23:02:30 +0200</pubDate><guid>https://www.dleibovych.com/posts/testing-flutter-bloc/</guid><description>&lt;p>I try to indroduce tests even to my side projects, just because tests fundamentally save time and make you think more about the project architecture.&lt;/p>
&lt;p>So of course while using the famous &lt;a href="https://pub.dev/packages/flutter_bloc">flutter_bloc&lt;/a> library for my projects I wanted a nice way to test it. I was very pleasantly surprised when I discovered that the library provides a very nice and elegant way to test the bloc via &lt;a href="https://pub.dev/packages/bloc_test">bloc_test&lt;/a>.&lt;/p>
&lt;p>First of all, add it to your dev dependencies:&lt;/p></description></item><item><title>App Localization in Flutter</title><link>https://www.dleibovych.com/posts/app-localization-in-flutter/</link><pubDate>Sun, 28 Nov 2021 21:03:20 +0200</pubDate><guid>https://www.dleibovych.com/posts/app-localization-in-flutter/</guid><description>&lt;p>If you are looking for some docs on how to localize your flutter app, the official one is the way to go &lt;a href="https://docs.flutter.dev/development/accessibility-and-localization/internationalization">https://docs.flutter.dev/development/accessibility-and-localization/internationalization&lt;/a>. Here I am only noting the steps, so I can recall that for my next app localization attempt with a Flutter app.&lt;/p>
&lt;p>So the steps are as follows:&lt;/p>
&lt;ol>
&lt;li>Add your flutter localization library in &lt;code>pubspec.yaml&lt;/code>:&lt;/li>
&lt;/ol>
&lt;pre tabindex="0">&lt;code>dependencies:
flutter:
sdk: flutter
flutter_localizations: # Add this line
sdk: flutter # Add this line
intl: ^0.17.0 # Add this line
&lt;/code>&lt;/pre>&lt;ol start="2">
&lt;li>Add &lt;code>generate: true&lt;/code> flag in &lt;code>pubspec.yaml&lt;/code>:&lt;/li>
&lt;/ol>
&lt;pre tabindex="0">&lt;code># The following section is specific to Flutter.
flutter:
generate: true # Add this line
&lt;/code>&lt;/pre>&lt;ol start="3">
&lt;li>Import following in your &lt;code>main.dart&lt;/code>:&lt;/li>
&lt;/ol>
&lt;pre tabindex="0">&lt;code>import &amp;#39;package:flutter_localizations/flutter_localizations.dart&amp;#39;;
import &amp;#39;package:flutter_gen/gen_l10n/app_localizations.dart&amp;#39;;
&lt;/code>&lt;/pre>&lt;ol start="4">
&lt;li>Modify your app as follows:&lt;/li>
&lt;/ol>
&lt;pre tabindex="0">&lt;code>return const MaterialApp(
title: &amp;lt;Title&amp;gt;,
localizationsDelegates: [
AppLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: [
Locale(&amp;#39;en&amp;#39;, &amp;#39;&amp;#39;), // English, no country code
Locale(&amp;#39;ru&amp;#39;, &amp;#39;&amp;#39;), // Russian, no country code
],
home: &amp;lt;Home Page&amp;gt;,
);
&lt;/code>&lt;/pre>&lt;ol start="5">
&lt;li>Create an &lt;code>l10n.yaml&lt;/code> file in the project root with the contents being:&lt;/li>
&lt;/ol>
&lt;pre tabindex="0">&lt;code>arb-dir: lib/l10n
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
&lt;/code>&lt;/pre>&lt;ol start="6">
&lt;li>Create the folder for internationalizations: &lt;code>&amp;lt;project_root&amp;gt;/lib/l10n&lt;/code>, as specified in &lt;code>l10n.yaml&lt;/code>.&lt;/li>
&lt;li>Create files for localizations, the template being &lt;code>app_en.arg&lt;/code>, as specified in &lt;code>l10n.yaml&lt;/code>. I added &lt;code>app_ru.arg&lt;/code> specifically.&lt;/li>
&lt;li>Use your localized strings &lt;code>Text(AppLocalizations.of(context)!.helloWorld);&lt;/code>&lt;/li>
&lt;/ol>
&lt;p>To manually regenerate localized strings from the &lt;code>*.arb&lt;/code> files, run&lt;/p></description></item><item><title>Disable Webcam Audio on Linux</title><link>https://www.dleibovych.com/posts/disable-webcam-audio-on-linux/</link><pubDate>Thu, 11 Nov 2021 10:59:01 +0200</pubDate><guid>https://www.dleibovych.com/posts/disable-webcam-audio-on-linux/</guid><description>&lt;p>Sometimes I play around with my sound devices, just because I have quite a few connected to my laptop. Sometimes it means I forget to switch them back to where they need to be.&lt;/p>
&lt;p>This particularly works for my webcam audio, which is selected automatically when I change my output to hdmi audio.&lt;/p>
&lt;p>To locate the desired audio device call &lt;code>cat /proc/asound/modules&lt;/code>. My output looked like this:&lt;/p>
&lt;pre tabindex="0">&lt;code> 0 snd_hda_intel
1 snd_hda_intel
2 snd_usb_audio
&lt;/code>&lt;/pre>&lt;p>Since I only have one usb audio device installed, and it is my webcam, I want to block &lt;code>snd_usb_audio&lt;/code>. To do that open the &lt;code>/etc/modprobe.d/blacklist.conf&lt;/code> and add the last line to it:&lt;/p></description></item><item><title>Useful Link: No Code Backend</title><link>https://www.dleibovych.com/posts/useful-link-no-code-backend/</link><pubDate>Tue, 02 Nov 2021 19:03:15 +0200</pubDate><guid>https://www.dleibovych.com/posts/useful-link-no-code-backend/</guid><description>&lt;p>This one contains a bunch of no-code backends. Very useful!&lt;/p>
&lt;p>&lt;a href="https://draftbit.com/blog/11-best-no-code-and-low-code-backends-for-2021">https://draftbit.com/blog/11-best-no-code-and-low-code-backends-for-2021&lt;/a>&lt;/p></description></item><item><title>Adding Gradle Wrapper to an Existing Project</title><link>https://www.dleibovych.com/posts/adding-gradle-wrapper-to-an-existing-project/</link><pubDate>Sat, 23 Oct 2021 12:54:14 +0300</pubDate><guid>https://www.dleibovych.com/posts/adding-gradle-wrapper-to-an-existing-project/</guid><description>&lt;p>Another little one today, I specifically tried to build the vlc-android app myself to fix a song title issue I have.
However, it wasn&amp;rsquo;t building with the error&lt;/p>
&lt;pre tabindex="0">&lt;code>Gradle sync failed: Minimum supported Gradle version is 7.0.2. Current version is 6.8. If using the gradle wrapper, try editing the distributionUrl in /home/ariedov/Projects/vlc-android/gradle/wrapper/gradle-wrapper.properties to gradle-7.0.2-all.zip (5 s 953 ms)
&lt;/code>&lt;/pre>&lt;p>but there is no &lt;code>gradle/*&lt;/code> or &lt;code>gradlew&lt;/code> included in the repository. That&amp;rsquo;s not how I usually have my repositories, so I did not have an immediate solution to that problem.&lt;/p></description></item><item><title>Casting Lists and Maps in Dart</title><link>https://www.dleibovych.com/posts/casting-lists-and-maps-in-dart/</link><pubDate>Fri, 22 Oct 2021 19:29:40 +0300</pubDate><guid>https://www.dleibovych.com/posts/casting-lists-and-maps-in-dart/</guid><description>&lt;p>Another short Dart tip today, and another one that occurred while testing some dart code, but most useful for me when parsing JSON.&lt;/p>
&lt;h3 id="lists">Lists&lt;/h3>
&lt;p>For &lt;code>List&amp;lt;dynamic&amp;gt;&lt;/code> I got from a JSON Map, when trying to save them as &lt;code>List&amp;lt;String&amp;gt;&lt;/code> the errors like:&lt;/p>
&lt;pre tabindex="0">&lt;code>type &amp;#39;List&amp;lt;dynamic&amp;gt;&amp;#39; is not a subtype of type &amp;#39;List&amp;lt;String&amp;gt;&amp;#39;
&lt;/code>&lt;/pre>&lt;p>The fix is as simple as using something like that:&lt;/p>
&lt;pre tabindex="0">&lt;code>List&amp;lt;String&amp;gt; correctList = &amp;lt;dynamic&amp;gt;[].cast&amp;lt;String&amp;gt;();
&lt;/code>&lt;/pre>&lt;h3 id="maps">Maps&lt;/h3>
&lt;p>And for JSON maps that I needed to be parsed as &lt;code>Map&amp;lt;String, String&amp;gt;&lt;/code>:&lt;/p></description></item><item><title>Reading File as String in Dart</title><link>https://www.dleibovych.com/posts/reading-file-as-string-in-dart/</link><pubDate>Mon, 18 Oct 2021 17:07:53 +0300</pubDate><guid>https://www.dleibovych.com/posts/reading-file-as-string-in-dart/</guid><description>&lt;p>Reading a file in Dart is very straigthforward, so for this article not to be 4 lines long I have to write something down.
I, personally, needed this for having a json in Unit tests.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-dart" data-lang="dart">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">final&lt;/span> file &lt;span style="color:#f92672">=&lt;/span> File(&lt;span style="color:#e6db74">&amp;#34;path/to/file&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">final&lt;/span> fileContents &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">await&lt;/span> file.readAsString();
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Nice reading files in Dart to you =)&lt;/p></description></item><item><title>Fix Audio Distortion on Internal Mic on Linux</title><link>https://www.dleibovych.com/posts/fix-audio-distortion-on-internal-mic/</link><pubDate>Sat, 16 Oct 2021 15:41:46 +0300</pubDate><guid>https://www.dleibovych.com/posts/fix-audio-distortion-on-internal-mic/</guid><description>&lt;p>&lt;em>I am writing this article since I had this issue on pretty much every linux installation.&lt;/em>
&lt;em>This will only work if you&amp;rsquo;re using pulseaudio for sound on Linux.&lt;/em>&lt;/p>
&lt;p>The general advice I found was editing every &lt;code>analog-input*.conf&lt;/code> file in &lt;code>/usr/share/pulseaudio/alsa-mixer/paths/&lt;/code>, however only changing &lt;code>analog-input-internal-mic.conf&lt;/code> worked for me, since I only experienced the issue with the internal mic.&lt;/p>
&lt;p>In the &lt;code>analog-input-internal-mic.conf&lt;/code> change:&lt;/p>
&lt;ul>
&lt;li>Under [Element Capture] set &lt;code>volume&lt;/code> to &lt;code>zero&lt;/code>&lt;/li>
&lt;li>Under [Element Internal Mic Boost] set &lt;code>volume&lt;/code> to &lt;code>zero&lt;/code>.&lt;/li>
&lt;li>Under [Element Int Mic Boost] set &lt;code>volume&lt;/code> to &lt;code>zero&lt;/code>.&lt;/li>
&lt;li>Under [Element Mic Boost] set &lt;code>volume&lt;/code> to &lt;code>zero&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>Restart pulseaudio by calling:&lt;/p></description></item><item><title>Xamarin.Android on Linux</title><link>https://www.dleibovych.com/posts/xamarin-android-on-linux/</link><pubDate>Fri, 15 Oct 2021 12:50:01 +0300</pubDate><guid>https://www.dleibovych.com/posts/xamarin-android-on-linux/</guid><description>&lt;h3 id="the-ide">The IDE&lt;/h3>
&lt;p>First things first - Jetbrains. Rider is required, there is no other tool available for writing Xamarin code on Linux. Grab it here &lt;a href="https://www.jetbrains.com/rider/">https://www.jetbrains.com/rider/&lt;/a>&lt;/p>
&lt;p>Make sure to install &lt;code>Xamarin.Android&lt;/code> support plugin. The installation guide will also have that option available.&lt;/p>
&lt;h3 id="c-on-linux">C# on Linux&lt;/h3>
&lt;p>Next is mono - the layer which allows provides necessary tools to build C# code on Linux and Mac.
&lt;a href="https://www.mono-project.com/">https://www.mono-project.com/&lt;/a>&lt;/p>
&lt;p>Now the tricky stuff, installing Xamarin.Android. There is no fancy website with installation guides, just an appcenter project with build artifacts. It was Jenkins before that.  &lt;a href="https://dev.azure.com/xamarin/public/_build/results?buildid=43659&amp;amp;view=artifacts&amp;amp;pathAsName=false&amp;amp;type=publishedArtifacts">https://dev.azure.com/xamarin/public/_build/results?buildid=43659&amp;amp;view=artifacts&amp;amp;pathAsName=false&amp;amp;type=publishedArtifacts&lt;/a>&lt;/p></description></item></channel></rss>