Skip to content

Instantly share code, notes, and snippets.

View teerasej's full-sized avatar
🎯
Teaching about cross platform mobile app development and A.I

Teerasej Jiraphatchandej teerasej

🎯
Teaching about cross platform mobile app development and A.I
View GitHub Profile
import { SQLite, SQLiteObject } from '@ionic-native/sqlite';
constructor(private sqlite: SQLite) { }
...
this.sqlite.create({
name: 'data.db',
location: 'default'
})

1. Create key store file

keytool -genkey -v -keystore [my-release-key].keystore -alias [alias_name] -keyalg RSA -keysize 2048 -validity 10000

  • my-release-key is file's name.
  • alias_name is key's alias name.

2. Build release APK

@teerasej
teerasej / Ionic2_release_command_for_android.md
Created April 24, 2017 17:50
Ionic2_release_command_for_android.md

1. Create un-signed APK file

Run this command in Ionic's project folder

cordova build --release android

2. Create key store file

keytool -genkey -v -keystore [my-release-key-name].keystore -alias [alias_name] -keyalg RSA -keysize 2048 -validity 10000

@teerasej
teerasej / z-automator.png
Created May 18, 2017 11:18 — forked from lrytz/z-automator.png
Shortcut for Syntax Highlighting in Keynote
@teerasej
teerasej / fix_ionic_start_npm_error.md
Created June 28, 2017 15:13
A command to run on Windows to fix "npm ERR! git clone"
npm update
npm update node
npm install @ionic/app-scripts@latest

วิธีใช้งาน Ionic Resources

  1. (ถ้ายังไม่ได้สมัคร Ionic Account) รันคำสั่ง ionic singup และลงทะเบียน พร้อมทั้ง activate ตัว account ให้เรียบร้อย
  2. เตรียมไฟล์รูปภาพ icon.png สำหรับภาพไอคอน (1024x1024px) วางไว้ในโฟลเดอร์ resources ของโปรเจค
  3. เตรียมไฟล์รูปภาพ splash.png สำหรับภาพ Splash screen (2732×2732px) วางไว้ในโฟลเดอร์ resources ของโปรเจค
  4. ใช้คำสั่ง ionic cordova resources เพื่อให้ระบบเริ่มอัพโหลดรูปภาพขึ้น Server (อาจจะมีการให้ login ด้วย Ionic Account ที่สมัครไว้ตอนแรก)
@teerasej
teerasej / asp.net_core_web_api.md
Last active September 22, 2017 05:44
Web API with ASP.NET Core

Web API with ASP.NET Core

สร้างโปรเจค Web API

  1. ไปที่ File Menu > New > Project
  2. เลือก ASP.NET Core Web Application
  3. ตั้งชื่อว่า ContactWebAPI
  4. ทดสอบรัน Application

สร้าง Model

@teerasej
teerasej / readme.md
Last active December 13, 2017 03:54
รวมรายชื่อของ Web API ใช้เรียนรู้การต่อ Web App, Mobile App, Bot กับ Web API แบบต่างๆ ดูรายละเอียดเพิ่มเติมที่ http://www.nextflow.in.th/
  1. หาเพลงใน iTune
  1. รายชื่อการ์ตูนค่าย Studio Ghibli
  1. ราคา Bitcoin แปลงเป็นเงินไทย
  1. อัตราแลกเปลี่ยนสกุลเงิน EURO กับค่าเงินอื่น
@teerasej
teerasej / app.js
Created March 16, 2018 08:33
ตัวอย่างการแสดงเมนู และ dialog สำหรับเก็บข้อมูลลูกค้าระหว่าง dialog ด้วย session.dialogData
bot.dialog('/', function (session) {
session.send('สวัสดีค่ะ');
session.beginDialog('menu');
});
bot.dialog('menu', [
function(session){
builder.Prompts.choice(session
, 'ต้องการทำอะไรคะ?'
, ["ดูกองทุน", "ขอข้อมูลกองทุนเพิ่มเติม"]
@teerasej
teerasej / fishing_vessel.md
Last active May 9, 2018 08:08
เพิ่มส่วนการสร้าง Web API ให้กับ Web server ที่ใช้ CodeIgniter สำหรับศูนย์พัฒนาการประมง

Controller

  1. สร้างไฟล์ application/controllers/api/FishingVessel.php
  2. วางโค้ดด้านล่างลงไป
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class FishingVessel extends CI_Controller {
 public function __construct()