Skip to content

Instantly share code, notes, and snippets.

Working from home

nekocode nekocode

Working from home
Block or report user

Report or block nekocode

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
josdejong / merge.kt
Last active Aug 9, 2019
Merge two data classes in Kotlin
View merge.kt
import kotlin.reflect.full.declaredMemberProperties
import kotlin.reflect.full.primaryConstructor
* Merge two data classes
* The resulting data class will contain:
* - all fields of `other` which are non null
* - the fields of `this` for the fields which are null in `other`
Pulimet / AdbCommands
Last active Aug 18, 2019
Adb useful commands list
View AdbCommands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
biezhi /
Last active Jun 6, 2019
Java二维码输出到控制台,需引入 zing 库,颜色代码见
import java.util.Hashtable;
try {
ViewConfiguration config = ViewConfiguration.get(this);
Field menuKeyField = ViewConfiguration.class.getDeclaredField("sHasPermanentMenuKey");
if (menuKeyField != null) {
menuKeyField.setBoolean(config, false);
SupaHam / DynamicProxies.kt
Last active Jun 11, 2019
Dynamic Proxies with Kotlin for accessing private classes.
View DynamicProxies.kt
* Code by @vmironov on Kotlinlang slack.
* This code uses dynamic proxies in Java to make it easier to access inaccessible classes via an accessible representation.
inline fun <reified T : Any> createMirror(value: Any) = createMirror(value,
fun <T> createMirror(value: Any, clazz: Class<T>): T {
val loader = clazz.classLoader
lisawray /
Last active Jun 22, 2018
Vector drawables from XML with the Android support library 23.3.0
package com.xwray.vectorbinding;
import android.databinding.BindingAdapter;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.widget.TextView;
neworld /
Last active May 15, 2019
How to make faster Android build without sacrificing new api lint check

Original solution sacrifices new api lint check.

Here my solution:

int minSdk = hasProperty('minSdk') ? minSdk.toInteger() : 16

apply plugin: ''

android {
    compileSdkVersion 23
gokulkrishh / media-query.css
Last active Aug 19, 2019
CSS Media Queries for Desktop, Tablet, Mobile.
View media-query.css
##Device = Desktops
##Screen = 1281px to higher resolution desktops
@media (min-width: 1281px) {
jeromerobert /
Last active Jun 5, 2019
Pandoc filter to create PDF files from SVG
#! /usr/bin/env python
Pandoc filter to convert svg files to pdf as suggested at:
__author__ = "Jerome Robert"
import mimetypes
import subprocess
You can’t perform that action at this time.