16 ธันวาคม 2561

Android utility app for Pokemon Go user

If you play Pokemon Go game. I would like to suggest the utility app for you. The "go app" on Android play store (https://play.google.com/store/apps/details?id=draood.pokeapp2).


You can search for each your favorite pokemons by filtering the type, pokemon name and sort by your prefered criteria.

When you open the app, you will see the result like this in the 1st time.



In the pokemon type dropdown, you can filter the type that you want to filter.


In the sort drop down, you can perform sorting by the condition that you want.


In the example below, I will filter pokemon type to "water" and sort by "cp", the result will look like this image.



In the example below, I will filter the pokemon name that contain "poli" only.


You can see pokemon detail by clicking each pokemon card. The example below, I click poliwag.
I can see basic information including the shiny form image.


I can see the pokemon move list like this.



I can also see the type counter for this pokemon and see the evolution forms of this pokemon.

This app is free to use on Android Play store (https://play.google.com/store/apps/details?id=draood.goapp)

If you like it, please review the app for me and provide feed back.

05 ธันวาคม 2561

create swift framework and include some dependency using swift package manager

in the example, i gonna create swift framework and use library https://github.com/vapor/jwt

1. create new folder, e.g., testJwt
$ mkdir testJwt

2. goto the folder
$ cd testJwt

3. init package
$ swift package init

4. update Package.swift
$ vi Package.swift

update file like this

dependencies: [
        // Dependencies declare other packages that this package depends on.
        // .package(url: /* package url */, from: "1.0.0"),
        .package(url: "https://github.com/vapor/jwt.git", from: "3.0.0")
    ],
    targets: [
        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
        // Targets can depend on other targets in this package, and on products in packages which this package depends on.
        .target(
            name: "testJwt",
            dependencies: ["JWT"]),
        .testTarget(
            name: "testJwtTests",
            dependencies: ["testJwt"]),

    ]


5. install package dependencies
$ swift package update

6. generate xcode project
$ swift package generate-xcodeproj

7. build project
$ swift build

8. then you can call JWT from your framework code by adding import JWT at the top of the swift file


Note:

if you found the error like error: 'openssl/conf.h' file not found

try to install commands below

$ brew install openssl
$ brew upgrade openssl
$ brew install libressl

12 กรกฎาคม 2561

build android apk release file using cordova


  • goto the cordova root path
  • generate key file using command >> keytool -genkey -v -keystore YOUR_FILE.jks -keyalg RSA -keysize 2048 -validity 10000 -alias YOUR_ALIAS (example ==> keytool -genkey -v -keystore sample.jks -keyalg RSA -keysize 2048 -validity 10000 -alias sample)
  • move the key file to FILE_NAME.jks path platforms/android/
  • create file platforms/android/release-signing.properties with the following content

storeFile=FILE_NAME.jks
storeType=jks
keyAlias=YOUR_ALIAS
keyPassword=YOUR_PASSWORD
storePassword=YOUR_PASSWORD

  • goto the cordova root path and run >>> cordova build --release


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 ภาววิทย์ กลิ่นประทุม