Skip to content

Instantly share code, notes, and snippets.

@seokju-na
seokju-na / algebraic_effects.kt
Created July 31, 2020 03:43 — forked from tanmatra/algebraic_effects.kt
Simple "algebraic effects" implementation on Kotlin
/*
* https://overreacted.io/algebraic-effects-for-the-rest-of-us/
*/
private val effectsStack = ThreadLocal<EffectsFrame>()
fun <T> perform(effectKey: Any): T {
var frame = effectsStack.get()
while (frame != null) {
@Suppress("UNCHECKED_CAST")
@seokju-na
seokju-na / adbwifi.sh
Created November 1, 2019 09:31 — forked from toori67/adbwifi.sh
Android adb wifi debug shell script.
#!/bin/bash
adb kill-server
adb start-server
echo "Connect device with usb cable"
adb wait-for-device
ANDROID_IP=`adb shell ifconfig wlan0 | awk '/inet addr/ {gsub("addr:", "", $2); print $2}'`
adb tcpip 5555
adb connect $ANDROID_IP:5555