Skip to content

Instantly share code, notes, and snippets.

View naphatamity's full-sized avatar

Naphat Far naphatamity

View GitHub Profile
[{"id":"761b10cc.a589e","type":"function","z":"969911ad.79d59","name":"","func":"msg.payload = {\n \"text\": \"ติดต่อสอบถาม\",\n \"api\":[\"chatbot_intent\", \"chatbot_action\"],\n \"txn_id\": \"t-b08c44c844\",\n \"rqs_chnl\": \"branch\",\n \"usr_sgmt\": \"rm\",\n \"rqs_tms\": \"2021-07-08 03:08:26.830332\"\n}\nmsg.url = \"https://knlp-uat.kasikornbank.com/poc\";\nmsg.TimestampMessageIn = msg.payload.rqs_tms\nmsg.timeout = 20000;\nmsg.retryLimit = 2;\nreturn msg;","outputs":1,"noerr":0,"x":1130,"y":680,"wires":[["e88313f9.2341e"]]},{"id":"ff7c5b79.04f518","type":"inject","z":"969911ad.79d59","name":"","topic":"","payload":"","payloadType":"date","repeat":"600","crontab":"","once":true,"x":950,"y":680,"wires":[["761b10cc.a589e"]]},{"id":"eb7aa0c4.4fe55","type":"debug","z":"969911ad.79d59","name":"","active":true,"console":"false","complete":"true","x":1470,"y":680,"wires":[]},{"id":"e88313f9.2341e","type":"http request","z":"969911ad.79d59","nam
@naphatamity
naphatamity / aurorachat.html
Last active June 21, 2021 05:55
aurorachat
html,
body,
button {
font-size: 20px;
}
*,
:after,
:before {
box-sizing: border-box;
}
@naphatamity
naphatamity / redirect_tool.html
Last active July 27, 2021 07:43
redirect_tool.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
/>
@naphatamity
naphatamity / popup_window_message_reaction.xml
Last active April 27, 2021 06:32
popup_window_message_reaction
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
@naphatamity
naphatamity / chat_list.xml
Last active April 27, 2021 06:15
chat_list
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/content_recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:keepScreenOn="false"
@naphatamity
naphatamity / item_chat_reply.xml
Last active April 15, 2021 13:44
item_chat_reply
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:padding="10dp">
@naphatamity
naphatamity / item_chat_list.xml
Last active April 27, 2021 06:18
item_chat_list
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:clickable="true"
android:focusable="true">
@naphatamity
naphatamity / ListListener.kt
Created April 15, 2021 13:35
ListListener
interface ListListener {
fun onItemClick(chatItem: EkoMessage, position: Int, holder: View)
fun onItemLongClick(chatItem: EkoMessage, position: Int, holder: View)
}
class App : Application(){
override fun onCreate() {
super.onCreate()
EkoClient.setup(API_KEY)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe()
EkoClient.registerDevice("Mobile_USER")
@naphatamity
naphatamity / MainActivity.kt
Last active April 26, 2021 18:37
MainActivity
private fun initEkoClient() {
EkoClient.setup(apikey)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe()
EkoClient.registerDevice(userID)
.displayName(userName)
.build()