Skip to content

Instantly share code, notes, and snippets.

View waltsu's full-sized avatar

Valtteri Virtanen waltsu

  • Smartly.io
  • Helsinki, Finland
View GitHub Profile
@waltsu
waltsu / gist:6343725
Last active December 21, 2015 17:59
Android's runOnUiThread helper to Scala. No need to create new runnables all the time, just pass function which will be run on the UI-thread
def runOnUiThread(activity: Activity, func: () => Unit): Unit =
activity.runOnUiThread(new Runnable() {
override def run: Unit =
func()
})
// ... Somewhere else than in UI-thread
val adapter = listAdapter(list)
@waltsu
waltsu / 1_introduction.tex
Last active December 21, 2015 13:09
Using https://github.com/sschober/kqwait to watch and build Latex-project
# pages/1_introduction.tex
\chapter{Introduction}
Introduction of the best paper ever!