lscpu | grep -i Virtualization
VT-x
for IntelAMD-Vi
for AMD
interface NetworkMonitor { | |
val isOnline: Flow<Boolean> | |
} | |
class NetworkMonitorImpl @Inject constructor( | |
@ApplicationContext private val context: Context, | |
@Dispatcher(IO) private val ioDispatcher: CoroutineDispatcher, | |
) : NetworkMonitor { | |
override val isOnline: Flow<Boolean> | |
get() = callbackFlow { |
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | |
plugins { | |
id("org.jetbrains.dokka") version "1.6.10" | |
id("maven-publish") | |
id("java-library") | |
id("signing") | |
id("jacoco") | |
application | |
kotlin("jvm") version "1.6.10" |
This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like
pipewire-debian
, you might get into conflicts.
Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.
Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.
Based on Debian Wiki, but simplified for Ubuntu 22.04.
Discord timestamps can be useful for specifying a date/time across multiple users time zones. They work with the Unix Timestamp format and can be posted by regular users as well as bots and applications.
The Epoch Unix Time Stamp Converter is a good way to quickly generate a timestamp. For the examples below I will be using the Time Stamp of 1543392060
, which represents November 28th, 2018
at 09:01:00
hours for my local time zone (GMT+0100 Central European Standard Time).
Style | Input | Output (12-hour clock) | Output (24-hour clock) |
---|---|---|---|
Default | <t:1543392060> |
November 28, 2018 9:01 AM | 28 November 2018 09:01 |
apply plugin: 'maven-publish' | |
apply plugin: 'signing' | |
task androidSourcesJar(type: Jar) { | |
archiveClassifier.set('sources') | |
if (project.plugins.findPlugin("com.android.library")) { | |
from android.sourceSets.main.java.srcDirs | |
from android.sourceSets.main.kotlin.srcDirs | |
} else { | |
from sourceSets.main.java.srcDirs |
This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/
the command zig run my_code.zig
will compile and immediately run your Zig
program. Each of these cells contains a zig program that you can try to run
(some of them contain compile-time errors that you can comment out to play
with)
android { | |
onVariantProperties { | |
val mainOutput = outputs.single { it.outputType == VariantOutputConfiguration.OutputType.SINGLE } | |
tasks.register<CreateRenamedApk>("createRenamedApkFor${name}") { | |
this.originalApkFolder.set(artifacts.get(ArtifactType.APK)) | |
this.builtArtifactsLoader.set(artifacts.getBuiltArtifactsLoader()) | |
this.newApkFolder.set(layout.buildDirectory.dir("outputs/renamed_apk/${[email protected]}")) | |
this.versionCode.set(mainOutput.versionCode) | |
this.versionName.set(mainOutput.versionName) | |
} |