Skip to content

Instantly share code, notes, and snippets.

Blast Piruin Panichphol piruin

Block or report user

Report or block piruin

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
@piruin
piruin / settings.json
Created May 8, 2018
VS Code's user setting of mine
View settings.json
{
"editor.fontLigatures": true,
"editor.fontFamily": "Fira Code",
"editor.fontSize": 16,
"files.insertFinalNewline": true,
"workbench.colorTheme": "Default Light+",
"workbench.iconTheme": "vscode-icons",
@piruin
piruin / update-gradlew-permission.bat
Created Feb 19, 2018
fix gradlew permission on windows
View update-gradlew-permission.bat
git update-index --chmod=+x gradlew
@piruin
piruin / AndroidThread.kt
Created Oct 30, 2017
Kotlin's Extension for Easy Handler Thread
View AndroidThread.kt
package org.tanrabad.survey.larvaecam
import android.app.Fragment
import android.content.Context
import android.os.AsyncTask
import android.os.Handler
import android.os.Looper
import android.view.View
inline fun Context.runOnWorkerThread(crossinline task: () -> Unit) {
@piruin
piruin / DrawableCompat.kt
Last active Jun 25, 2019
Kotlin Extension for set/get compound Drawable to TextView/EditText/Button as property
View DrawableCompat.kt
/*
* Copyright 2017 Piruin Panichphol
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@piruin
piruin / Nillable.java
Created Apr 28, 2017
GSON's JsonAdapter for handle `{ @nil:true }` in tranfromed JSON from XML
View Nillable.java
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import java.lang.reflect.Type;
class Nillable<T> implements JsonDeserializer<T> {
@Override
@piruin
piruin / nectec-copyright-template
Last active Sep 11, 2017
NECTEC Copyright (Velocity) template for Intellij IDEA and Android Studio
View nectec-copyright-template
@piruin
piruin / colors.xml
Created Nov 21, 2016 — forked from kalehv/colors.xml
Material Design Color Palette Colors.xml Resource file for Android
View colors.xml
<?xml version="1.0" encoding="utf-8"?>
<!--
Google Material Design Color Palette for Android http://www.google.com/design/spec/style/color.html#color-ui-color-palette
Spreadsheet used to create this reosurce - http://bit.ly/mdcolor_spreadsheet
Link to this colors.xml resource file - http://bit.ly/mdcolorsxml
Harshad Kale
https://github.com/kalehv
harshad.kale@gmail.com
@piruin
piruin / start.bat
Created Sep 9, 2016
batch file to start multiple jar instance
View start.bat
@echo off
start "api-9001" java -Dfile.encoding=UTF8 -Dlog4j.configurationFile=log4j2.xml -jar faarmis-api-1.0.jar -port 9001
start "api-9002" java -Dfile.encoding=UTF8 -Dlog4j.configurationFile=log4j2.xml -jar faarmis-api-1.0.jar -port 9002
start "api-9003" java -Dfile.encoding=UTF8 -Dlog4j.configurationFile=log4j2.xml -jar faarmis-api-1.0.jar -port 9003
@piruin
piruin / ThaichoteMapTile.java
Last active Jun 8, 2016
Caching version of ThaichoteMapTile
View ThaichoteMapTile.java
/*
* Copyright (c) 2016 NECTEC
* National Electronics and Computer Technology Center, Thailand
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
You can’t perform that action at this time.