Skip to content

Instantly share code, notes, and snippets.

View ImanX's full-sized avatar

Alireza Tarazani ImanX

View GitHub Profile
@alfonsogarsan
alfonsogarsan / kotlin-coroutines-example-01.kt
Last active July 21, 2020 08:54
This is a little example of how to compose two coroutines (IO) to work concurrently and to make parent coroutine to suspend in await calls
import kotlinx.coroutines.*
fun main() {
GlobalScope.launch {
println("[${Thread.currentThread().name}] Before asyncs")
val one = async (Dispatchers.IO) { doSomething1() }
val two = async (Dispatchers.IO) { doSomething2() }
println("[${Thread.currentThread().name}] After asyncs")
println("[${Thread.currentThread().name}] The answer is ${one.await() + two.await()}")
@lopspower
lopspower / README.md
Last active June 7, 2025 20:25
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@subfuzion
subfuzion / curl.md
Last active June 8, 2025 06:04
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.