Skip to content

Instantly share code, notes, and snippets.

View mitchwongho's full-sized avatar
:atom:
Build > Test > Deploy

Mitchell Wong Ho mitchwongho

:atom:
Build > Test > Deploy
View GitHub Profile
@d-plaindoux
d-plaindoux / example_net_web_view.kt
Last active May 1, 2021 08:45
Naive example composing functions using the network, http web client and files.
suspend fun doSomething(webView: WebView): Int {
val v1 = firstAction()
val v2 = secondAction(webView)
val v3 = thirdAction()
return v1 + v2 + v3 // .i.e. 42
}
suspend fun firstAction(): Int =
// Do some stuff on the network for example ...
// Inspired by https://gist.github.com/tanmatra/3c2cec5d5d4345bea7a5f7c105af7238
import Effects.Companion.withEffects
import io.smallibs.utils.Await
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.launch
import kotlin.coroutines.Continuation
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine
@cstromme
cstromme / android_dev.md
Last active January 26, 2018 09:02
Android/Kotlin Developer (freelance, remote or on-site)

Android/Kotlin Developer (freelance, remote or on-site)

Vuu are looking for you

Who we are

We are a dedicated team of movie and TV enthusiasts building a unique content platform centered around movies and TV-series for web, mobile and third-party systems.

Currently, we're growing our design and development team from the ground up. Given the competitive nature of our industry and the app development space, we're keeping our efforts to ourselves for the time being. But we'd love to give the right person the grand tour, and the option to join an exciting new startup in its early stages.

We are very open to remote freelancers, but require you to be open to visit our main office in Norway on a regular basis. Our remote workers start with a 2-4 week period in Norway before transitioning back to their remote locations, and come back to Norway every ~3 months for a 1-2 week period. All trips and stays in Norway are of co

@brendanzab
brendanzab / reactive_systems_bibliography.md
Last active October 10, 2022 06:36
A reading list that I'm collecting while building my Rust ES+CQRS framework: https://github.com/brendanzab/chronicle

Functional, Reactive, and Distributed Systems Bibliography

Books

@henriquemenezes
henriquemenezes / android-generate-keystores.md
Last active April 6, 2024 13:37
Android: Generate Release/Debug Keystores

Android: Generate Release/Debug Keystores

Generate Keystores

Debug Keystore

$ keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "C=US, O=Android, CN=Android Debug"
@shekibobo
shekibobo / README.md
Last active March 2, 2020 11:04
Android: Base Styles for Button (not provided by AppCompat)

How to create custom button styles using Android's AppCompat-v7:21

Introduction

AppCompat is an Android support library to provide backwards-compatible functionality for Material design patterns. It currently comes bundled with a set of styles in the Theme.AppCompat and Widget.AppCompat namespaces. However, there is a critical component missing which I would have thought essential to provide the a default from which we could inherit our styles: Widget.AppCompat.Button. Sure, there's Widget.AppCompat.Light.ActionButton, but that doesn't actually inherit from Widget.ActionButton, which does not inherit from Widget.Button, so we might get some unexpected behavior using that as our base button style, mainly because Widget.ActionButton strictly belongs in the ActionBar.

So, if we want to have a decently normal default button style related to AppCompat, we need to make it ourselves. Let's start by digging into the Android SDK to see how it's doing default styles.

Digging In

@staltz
staltz / introrx.md
Last active April 29, 2024 09:25
The introduction to Reactive Programming you've been missing
@artem-zinnatullin
artem-zinnatullin / MyApp.java
Last active January 15, 2023 13:04
If you need to set one font for all TextViews in android application you can use this solution. It will override ALL TextView's typefaces, includes action bar and other standard components, but EditText's password font won't be overriden.
public class MyApp extends Application {
@Override
public void onCreate() {
TypefaceUtil.overrideFont(getApplicationContext(), "SERIF", "fonts/Roboto-Regular.ttf"); // font from assets: "assets/fonts/Roboto-Regular.ttf
}
}
@dodyg
dodyg / gist:5823184
Last active March 29, 2024 03:59
Kotlin Programming Language Cheat Sheet Part 1

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.