09 กรกฎาคม 2561

convert create-react-app to android/ios mobile application using cordova

steps

  • install jdk 1.8
  • install android studio
  • install gradle by running brew install gradle
  • accept android license by running ~/Library/Android/sdk/tools/bin/sdkmanager --licenses
  • install cordova by running sudo npm install -g cordova
  • create cordova app by running cordova create mycordova
  • goto mycordova cd mycordova
  • create react application inside mycordova by running create-react-app myweb
  • modify myweb/public/index.html like this

<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src * data: content:;">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<title>React App</title>
</head>
<body>
<div id="root"></div>
<script type="text/javascript" src="cordova.js"></script>
</body>
</html>



  • modify myweb/package.json like this
{
"name": "sample-app",
"version": "0.1.0",
"private": true,
"homepage": "./", // <- add="" span="">
"dependencies": {
"react": "^16.4.1",
"react-dom": "^16.4.1",
"react-scripts": "1.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build && cp -a ./build/. ../www/", // <- add="" span="">
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}

  • inside myweb run npm run build
  • goback to mycordova folder and then run cordova build to generate .apk file or run cordova run andriod to build and run app


30 มิถุนายน 2561

how to ean free bitcoins (btc), ethereum (eth), litecoins (ltc) for real

there are some mobile that allow user to earn bitcoins (btc), ethereum (eth), litecoins (ltc) for free.
these applications below are proved that they are not scam.

you can search these apps from google play and download them.





this is the real historical payment that i got.










19 มิถุนายน 2561

debugging golang using visual studio code (vscode)

To debug golang using vscode is quite easy. There are just 2 steps to do it.

1. download delve (go debugger) from https://github.com/derekparker/delve and follow the step to install it, e.g., for Mac OSX user, just run

go get -u github.com/derekparker/delve/cmd/dlv


2. setup launch.json in vscode like this

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Go debug",
"type": "go",
"request": "launch",
"mode": "debug",
"remotePath": "",
"port": 2345,
"host": "127.0.0.1",
"program": "${workspaceRoot}",
"env": {},
"args": [],
"cwd": "${workspaceRoot}",
"showLog": true
}
]
}

3. create main.go, and try to debug it

If you see error "econnrefused 127.0.0.1:2345", try remove host and port

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Go debug",
"type": "go",
"request": "launch",
"mode": "debug",
"remotePath": "",
"program": "${workspaceRoot}",
"env": {},
"args": [],
"cwd": "${workspaceRoot}",
"showLog": true
}
]
}

14 มีนาคม 2561

คาถาเรียกโอกาส

'ผมมีคาถา เรียก โอกาสครับ !!'

'จริงเหรอ !! ..คาถาอะไรล่ะ?'

'เขาเรียกว่า คาถาเรียกโอกาส ..แต่คาถานี้จะขัดความรู้สึกตอนเริ่มใช้มากๆ แต่พอใช้ไปแล้วชีวิตจะดีขึ้น โอกาสจะค่อยๆ วิ่งมาหาเรา'

คาถานั้นก็คือ ให้ท่องว่า 'ใครเจอเราคนนั้นโชคดี!!'

ข้อหนึ่ง : คนที่ท่องคาถานี้จะต้องมองความต้องการของคนอื่นและประโยชน์ของคนอื่นเป็นอย่างแรก ..และให้มองตัวเองทีหลัง

(นี่คือการคิดแบบผู้นำ เพราะผู้นำ มองลูกน้องและลูกค้าเป็นที่ตั้ง ..ถ้าลูกค้าและลูกน้องมีความสุข เดี๋ยวโอกาสและเงินวิ่งตามมาเอง)

ข้อสอง : คนที่ท่องคาถานี้ ต้องทำตัวให้เป็นที่พึ่งของคนอื่น โดยให้เป็นที่พึ่งในความรู้และความเชี่ยวชาญของเรา ...พูดง่ายๆว่า ถ้าใครก็ตามต้องการความช่วยเหลือเรื่องที่ฉันเก่ง เขาสามารถนึกถึงฉันคนแรก

(นี่คือเลือกความเชี่ยวชาญ เรื่องใดเรื่องหนึ่ง ที่ฉันรู้จริง เก่งจริง และที่สำคัญฉันชอบ มี Passion สุดๆ เรื่องนี้ ...ทุ่มเท เวลา ศึกษา เรื่องนี้แบบสุดตัว!! ..จนเพื่อนๆ ทุกคนรู้ว่า ถ้าเป็นเรื่องนี้ต้องฉันเท่านั้น)

ข้อสาม : คนที่ท่องคาถานี้ จะต้องมุ่งสร้างผลงาน จากเรื่องที่เลือก ...สร้างผลงาน ช่วยเหลือผู้คนรอบข้าง จากเรื่องที่ฉันเชี่ยวชาญ -- 'สร้างผลงาน!!'

ครับ!! นี่แหละหลักการเบื้องต้นของ 'วิธีเสกโอกาสดีๆ เข้ามาในชีวิต' -- 'ใครเจอเรา คนนั้นโชคดี'

ใครทำได้แบบนี้ ชีวิตจะค่อยๆดีขึ้น และมีโอกาสใหม่ๆในชีวิตวิ่งเข้ามา

นี่แหละหนึ่งในวิธีคิด 'ปั้นธุรกิจติดลมบน' ..เริ่มธุรกิจใช้เงินนิดเดียว ก็เพราะมันเริ่มที่ตัวเรา เริ่มที่ความเชี่ยวชาญไงล่ะ !!



from line ภาววิทย์ กลิ่นประทุม

23 กุมภาพันธ์ 2561

ขั้นตอนการขอวีซ่าเชงเก้น ประเทศฝรั่งเศส VISA Schengen

ขั้นตอนการขอวีซ่าเชงเก้น ประเทศฝรั่งเศส VISA Schengen

1. เข้าไปที่เว็บ https://fr.tlscontact.com/th/BKK/index.php และลงทะเบียน

2. กรอกแบบฟอร์มออนไลน์ (เลือกภาษาไทยหรืออังกฤษก็ได้) หลังจากนั้นระบบจะสร้างใบสมัครขอวีซ่า (VISA Application) ให้จากข้อมูลที่เรากรอกในแบบฟอร์ม พิมพ์ใบสมัครขอวีซ่า (VISA Application) ออกมาเซ็น

3. นัดวันยื่นเอกสารออนไลน์

4. ระบบจะแสดงรายการเอกสารต่างๆ ที่ต้องเตรียม ให้เราพิมพ์ใบรายการมาเก็บไว้ด้วย เพื่อเป็น check list



แนะนำ

1. รูปถ่าย สามารถไปถ่ายเองตามร้านถ่ายรูป หรือไปถ่ายที่ศูนย์บริการ TLScontact ก็ได้ แต่ถ้าไปถ่ายเองจะราคาถูกกว่า

2. Bank guarantee ขอได้ที่ธนาคาร โดยให้ขอเป็นเวอร์ชั่นภาษาอังกฤษ และใช้สกุลเงินเป็นยูโร

3. หลักฐานการจองโรงแรม แค่ไปจองโรงแรมเฉยๆ ยังไม่ต้องจ่ายเงินก็ได้ แล้วให้พิมพ์หน้าที่มีชื่อของเราไปยื่น (สำหรับคนจะไปพักกับเพื่อน ควรจองโรงแรมไปก่อน แล้วค่อยยกเลิกภายหลัง จะผ่านง่ายกว่า)

4. ประกันภัยการเดินทาง ให้นับวันที่เดินทางไปถึงฝรั่งเศส จนถึงวันที่ออกจากฝรั่งเศส เช่น
ขาไป ออกจาก กทม วันที่ 1 เมษา แต่ถึงฝรั่งเศส 2 เมษา
ขากลับ ออกจาก ฝรั่งเศส วันที่ 29 เมษา ถึงไทย 30 เมษา
ให้ทำประกัน 2 เมษา ถึง 29 เมษา
ประกันของผมทำที่นี่ครับ https://aga24h.allianz-assistance.co.th/th/schengen-visa-th/ แต่ก็สามารถทำกับเจ้าอื่นๆ ได้เหมือนกัน

5. ระยะเวลาในการพิจารณา VISA ประมาณ ไม่เกิน 2 สัปดาห์

14 กุมภาพันธ์ 2561

test port connection without telnet

we can use standard curl command to check port connection without telnet

e.g. i would like to test connection of the ip 10.11.12.13 and port 25

i simply run

curl -v telnet://10.11.12.13:25

04 กุมภาพันธ์ 2561

back pack นั่งรถทัวร์ จากกรุงเทพ ไปหาดพัทยา ชลบุรี

การเดินทางจากกรุงเทพไปหาดพัทยา
1. นั่งรถทัวร์จาก บขส ที่ BTS เอกมัย ไปลง บขส พัทยา (ราคา 108 บาท รถออกทุกครึ่งชั่วโมง วิ่งเช้าถึงค่ำ)



2. นั่งรถสองแถวจากบขส ไปลงหาดพัทยาเหนือ กลาง ใต้ (คนละ 40-50 บาท) หรือนั่ง Taxi (200-300 บาท)




การเดินทางจากหาดพัทยากลับกรุงเทพ
1. นั่งสองแถวมาลงบริเวณวงเวียน ตามรูปด้านล่าง (ค่ารถ 10 บาท)


2. รอรถสองแถวอีกสายที่หน้าร้าน Best supermarket ตามรูปด้านล่าง (ค่ารถ 10 บาท) เพื่อเดินทางไป บขส พัทยา 


3. นั่งรถทัวร์กลับ  BTS เอกมัย (ราคา 108 บาท รถออกทุกครึ่งชั่วโมง วิ่งเช้าถึงค่ำ)



รวมรูปภาพชายหาดพัทยา