Skip to content

Instantly share code, notes, and snippets.

View 0nko's full-sized avatar
🏠
Working from home

Ondrej Ruttkay 0nko

🏠
Working from home
  • Prague, Czech Republic
  • 01:18 (UTC +01:00)
View GitHub Profile
@0nko
0nko / ddg-permissions-test.html
Created September 7, 2026 12:05
DDG Android site permissions test page
<!doctype html>
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Site permissions test</title>
<style>
body { font: 16px system-ui; margin: 16px }
button { display: block; width: 100%; padding: 14px; margin: 8px 0; font-size: 16px }
h2 { margin: 24px 0 8px; font-size: 17px }
p { color: #555; margin: 4px 0 12px }
iframe { width: 100%; height: 420px; border: 3px solid #c00; border-radius: 6px }
</style>
@0nko
0nko / fireMode.json
Last active July 16, 2026 17:13
fireModePromo
{
"version": 2147483647,
"messages": [
{
"id": "android_fire_tabs_promo",
"content": {
"messageType": "big_two_action",
"titleText": "Try Fire Tabs",
"descriptionText": "Browse without saving local history or sign in to sites with a different account.",
"placeholder": "Announce",
@0nko
0nko / events.kt
Created July 29, 2017 16:10
C#-style events in Kotlin
fun main(args: Array<String>) {
val duck = Duck()
duck.talked += { said -> println("Duck: $said") }
duck.poke()
}
class Event<T>(val eventHandler: EventHandler<T>) {
operator fun plusAssign(observer: (T) -> Unit) { eventHandler.observers.add(observer) }
operator fun minusAssign(observer: (T) -> Unit) { eventHandler.observers.remove(observer) }