Skip to content

Instantly share code, notes, and snippets.

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@revdfdev
revdfdev / build.gradle
Created January 20, 2018 10:59
app gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt' //optional
android {
@revdfdev
revdfdev / build.gradle
Created January 20, 2018 10:59
MainGradle new
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.20'
ext.supportVersion = "27.0.2"
ext.ankoVersion = "0.10.2"
ext.okhttpVersion = "3.9.0"
ext.picassoVersion = "2.5.2"
ext.retrofitVersion = "2.2.0"
ext.gsonVersion = "2.8.2"
@revdfdev
revdfdev / AndroidContinuation.kt
Created December 19, 2017 07:37
Coroutines basic
package com.webcubictechnologies.bellmaison.coroutines
import android.os.Handler
import android.os.Looper
import kotlinx.coroutines.experimental.CommonPool
import kotlinx.coroutines.experimental.Deferred
import kotlinx.coroutines.experimental.async
import kotlinx.coroutines.experimental.delay
import kotlin.coroutines.experimental.AbstractCoroutineContextElement
import kotlin.coroutines.experimental.Continuation
@revdfdev
revdfdev / build.gradle
Created December 6, 2017 18:48
my main gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.0'
ext.ankoVersion = "0.10.2"
ext.daggerVersion = "2.11"
ext.okhttpVersion = "3.9.0"
ext.picassoVersion = "2.5.2"
ext.priorityJobQueueVersion = "2.0.1"
ext.mockitoVersion = "2.8.47"
@revdfdev
revdfdev / build.gradle
Created December 6, 2017 18:47
my buil-gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'realm-android'
@revdfdev
revdfdev / UDPListenerService
Created November 30, 2017 10:35 — forked from finnjohnsen/UDPListenerService
Android UDP Broadcast listener service
package no.nsb.ombord;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;
import org.apache.http.util.ExceptionUtils;
class RealmConfigStore {
companion object {
private var configMap: MutableMap<Class<out RealmObject>, RealmConfiguration> = HashMap()
fun <T : RealmObject> init(modelClass: Class<T>, realmCfg: RealmConfiguration) {
if (!configMap.containsKey(modelClass)) {
configMap.put(modelClass, realmCfg)
}
}