Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Mohsents's full-sized avatar

Timur Mohsents

  • Iran, Mashhad
View GitHub Profile
@burnoo
burnoo / Jetpack Compose two-way data binding.kt
Last active October 13, 2022 07:08
Jetpack Compose two-way data binding
private class MutableStateAdapter<T>(
private val state: State<T>,
private val mutate: (T) -> Unit
) : MutableState<T> {
override var value: T
get() = state.value
set(value) {
mutate(value)
}

Thread Pools

Thread pools on the JVM should usually be divided into the following three categories:

  1. CPU-bound
  2. Blocking IO
  3. Non-blocking IO polling

Each of these categories has a different optimal configuration and usage pattern.

@stvhwrd
stvhwrd / website-dl.md
Last active March 13, 2024 17:05
Download an entire website for offline use with wget. Internal inks will be corrected so that the entire downloaded site will work as it did online.

The best way to download a website for offline use, using wget

There are two ways - the first way is just one command run plainly in front of you; the second one runs in the background and in a different instance so you can get out of your ssh session and it will continue.

First make a folder to download the websites to and begin your downloading: (note if downloading www.SOME_WEBSITE.com, you will get a folder like this: /websitedl/www.SOME_WEBSITE.com/)


STEP 1: