28 มกราคม 2562

10 คำสอนตรงๆ ง่ายๆ ของ “หลวงพ่อคูณ” ที่จะคงอยู่ในใจตลอดไป

รวบรวม 10 โอวาทธรรม หรือคำสอนของ พระเทพวิทยาคม (หลวงพ่อคูณ ปริสุทฺโธ) พระเกจิอาจารย์ชื่อดังแห่งวัดบ้านไร่ จ.นครราชสีมา
เนื้อหาบางส่วนจากหนังสืออาจาริยานุสรณ์ พระเทพวิทยาคม (หลวงพ่อคูณ ปริสุทฺโธ) (เล่มใหญ่) จัดทำโดยมหาวิทยาลัยขอนแก่น ได้เผยแพร่โอวาทธรรมคำสอนของหลวงพ่อคูณที่จะคงอยู่ในใจตลอดไป “หลวงพ่อเทศนาเป็นคำพูดตรงๆ แทรกธรรมง่ายๆ ที่ประชาชนทั่วไปฟังแล้วเข้าใจได้ ในที่นี้ไม่สามารถสาธยายได้หมด จึงขอยกตัวอย่างมาเพียงบางส่วนเท่านั้น”


ก่อนสอนคนอื่นต้องสอนตัวเองก่อน

“มันต้องสอนตัวเองก่อน จะแนะนำอะไรเขา ตัวเองทำให้เขาดูตัวอย่างก่อน เช่น สอนให้เขาบริจาคทาน ตัวเองต้องบริจาคเสียก่อนด้วยจึงจะถูก ใครมันจะไปเชื่อ เชื่อไม่ได้ ต้องทำให้เขาดูก่อน สอนตัวเองก่อน ถึงค่อยไปสอนคนอื่น จะทำอะไรทุกอย่างมันต้องทำให้เขาดูก่อน เขาจึงจะเชื่อ… อย่างพระสงฆ์ อย่าดีแต่ไปสอนคนอื่น สอนตัวเองบ้างเถอะน่า สอนคนอื่นอย่างน้ำไหลไฟดับ แต่ตัวเองไม่สอน บอกให้เขาบริจาคเท่านั้นเท่านี้ แต่ตัวเองไม่ทำให้เขาดูก่อน หรือจะเป็นครูอะไรก็ตาม..เป็นครูนาฏศิลป์ก็ต้องรำเป็น หรือเป็นครูอะไรๆ ก็ต้องทำเป็นก่อนทั้งนั้น พระพุทธองค์ก็เหมือนกัน สอนตัวเองได้แล้วท่านเอาชนะตัวเองได้แล้ว จึงได้เสด็จออกไปเทศนาโปรดปัญจวัคคีย์และเวไนยสัตว์”





ความประมาทเป็นบ่อเกิดแห่งความตาย

หลวงพ่อมักจะให้ข้อคิดกับคนที่เอารถมาให้ท่านเจิมว่า “การขับรถอย่างระมัดระวังไม่ประมาท สำคัญกว่าการเจิม อย่างโบราณท่านว่า วิ่งไม่ดูตาม้าตาเรือก็ชนกันตาย การขับรถจะต้องดูทาง ถ้ามันคดโค้งจะต้องระมัดระวัง” “ถ้าประมาทเมื่อใดก็ตายเมื่อนั้น เพราะฉะนั้นทำอะไรทุกอย่าง ทำให้ดี อย่าได้ประมาท อย่าผัดผ่อน ถ้าประมาทแล้วนึกได้ทีหลังจะเสียใจ”



ละทำชั่ว ทำดี มีศีลธรรมประจำใจ

ละทำชั่ว ทำดี มีศีลธรรมประจำใจ ถือเป็นหัวใจของพระพุทธศาสนา ท่านมักกล่าวอยู่เสมอว่า “อยากให้บ้านเราเจริญนะ ไม่ยากหรอก ตั้งอยู่ในองค์ปัญจะทั้ง 5 คือ รักษาศีล 5 ให้บริสุทธิ์ ไม่ให้ขาด อย่าให้ด่างพร้อย เป็นมนุษย์สุดประเสริฐ หรือใครก็ตาม แม้แต่พระ เราก็ต้องรักษาศีล 5 ถ้าไม่มีศีล 5 ประจำใจ ไม่ว่าพระรูปใดรูปหนึ่งก็เป็นพระไม่ได้เหมือนกัน”


“กูให้มึงรู่จั๊กพอ”

ในวัตรปฏิบัติของหลวงพ่อคูณหลายประการที่เป็นการสอนธรรมโดยอ้อม เช่น การรับเงินจากญาติโยมที่มาบริจาคให้ท่านนำไปสร้างสาธารณกุศล ท่านจะหยิบเพียงใบเดียวและเป็นใบที่มีค่าน้อยที่สุด หลวงพ่อบอกว่าที่ทำเช่นนี้เพราะ…
“กูให้มึงรู่จั๊กพอเพราะผู้คนหาเงินมาด้วยความยากลำบาก ยิปทั่งหม๊ดจะเป็นการเอาเปรียบหยาดเหงื่อแรงงานของญาติโยม เราต้องมีเมตตาแก่เพื่อนมนุษย์ เกิด แก่ เจ๊บ ตาย เขาให่เท่าไหร่ก็เอาเท่านั้น มันเป็นไปไม่ได้ อย่าเอามากหลาย หลานเอ๊ย โลภของคนเรา ร่อยล้าน พันล่าน ก็ไม่พอให่รู้จักว่าพอกันซักทีซิ พูดว่า “พอ” กันซักที การรับบริจาคเพียงส่วนหนึ่งของกูนี่ เป็นการเตือนสติและสอนพุทธศาสนิกชนทั่งหลายว่าให่รู่จักพอ อย่าโลภมากหรือให่ลดความโลภ ความอยากได้ของคนอื่น อย่าเบียดเบียนเอารัดเอาเปรียบซึ่งกันและกัน”



“เราต้องให่เขาก่อน แล่วเขาก็จะให่เราทีหลัง”

ด้วยบารมีของหลวงพ่อคูณ เมื่อตั้งใจจะสร้างอะไร สิ่งนั้นย่อมสำเร็จ คือจะมีผู้บริจาคสมทบอย่างมากมาย เคยมีผู้สอบถามเรื่องนี้ หลวงพ่อหัวเราะพร้อมบอกว่า … “เราต้องให่เขาก่อน แล่วเขาก็จะให่เราทีหลัง และเมื่อเราได้รับการบริจาคมาแล้ว เราควรที่จะทำตัวให่เป็นประโยชน์ต่อสังคม ไม่ใช่หวังเก๊บหวังรวยแต่อย่างเดียว มันไม่ใช่วิสัยของเพศสมณะ เมื่อเขาเห็นเรานำไปทำประโยชน์ เขาก็ยิ่งแต่จะมาช่วยเรา ถ้าเราไม่นำไปทำบุญให่เขาต่อ เขาจะได้บุญอะไร”



การด่าลูกเป็นอัปมงคล พูดกับลูกๆ แต่สิ่งดีๆ มันจะได้เป็นมงคล

หลวงพ่อคูณให้พรเนื่องในโอกาสวันเด็กแห่งชาติ พ.ศ. 2540
“กูเองก็ขอให้เด็กไทยทุกคนจงประพฤติตัวให้เหมาะสมกับที่เราเป็นชาติไทย พวกลูกๆ หลานๆ ก็ขอให้ตั้งใจเล่าเรียนศึกษาหาความรู้ใส่ตัวเองเอาไว้ เมื่อเติบโตขึ้นเป็นผู้ใหญ่ก็จะมีวิชาหากินกับเขา อย่าได้เป็นเด็กเกเร ให้รู้จักรักพ่อแม่ เขาสั่งสอนบอกอะไรก็ให้เชื่อฟัง…”
“ทางพวกพ่อแม่ก็สั่งสอนให้ลูกๆ ถ้าจะเอ่ยคำสอนไหน ก็อย่าไปพูดว่า ลูกคนนี้ดื้อ ลูกคนนี้มึน ลูกคนนี้ซน ลูกคนนี้บอกยากสอนยาก เพราะมึงไปว่ามันมาแต่เล็กๆ มันเป็นอัปมงคล และจะส่งเสริมให้ลูกของมึงดื้อจริงๆ พวกมึงต้องพูดคำว่า เป็นคนดี บอกง่าย สอนง่าย ไม่เคยเกเร ให้พูดกับลูกๆ แต่สิ่งดีๆ มันจะได้เป็นมงคลและมันก็จะได้จดจำเอาไว้ มึงทำตามกูบอกเด้อลูกหลายเอ๊ย”



อย่าไปงมงายเอาเงินไปซื้อเลขหวย

“พวกมึงมาขอโชคพร กูก็ให้พรและเคาะหัว แต่เรื่องเลขเด็ดไม่มีให้ใครด๊อก อย่าไปงมงายเอาเงินไปซื้อเลขหวยกันเลย เก็บเงินไว้ซื้อกับข้าวดีกว่า”  (เดลินิวส์ 25 กันยายน 2541 ) กรณีข่าวเลขเด็ดอายุของหลวงพ่อคูณที่สร้างความสนใจให้กับนักเสี่ยงโชคทั่วประเทศ ทำให้ผู้สื่อข่าวพยายามติดต่อขอสัมภาษณ์หลวงพ่อตลอดวัน แต่หลวงพ่อไม่ว่าง เพราะรับแขกไม่ขาดสายจนไม่ได้พักผ่อน หลวงพ่อคูณได้พูดเตือนสติไปถึงนักเสี่ยงโชคสั้นๆ ว่า “กูไม่อยากพูดอะไรทั้งนั้น ไม่อยากให้ลูกหลานมันงมงายเกินเหตุ ใครจะโชคดีแล้วแต่โชควาสนา”  (เดลินิวส์ 31 สิงหาคม 2542)



พ่อแม่ที่อยู่บนบ้านต้องทำบุญทุกวัน คือต้องรู้จักตอบแทนบุญคุณ อย่ามัวแต่รอไปทำบุญ 100 วัน ซึ่งจะได้บุญน้อยกว่า

หลวงพ่อคูณแนะนำสั่งสอนให้รู้จักบุญคุณ และตอบแทนบุญคุณต่อผู้มีพระคุณ พ่อแม่ ครูอาจารย์ แผ่นดินหรือประเทศชาติอันเป็นที่กำเนิด เป็นที่อยู่อาศัย และพระเจ้าแผ่นดินที่เป็นศูนย์รวมจิตใจของคนทั้งชาติ หลวงพ่อบอกว่า ผู้เป็นลูกต้องรู้จักตอบแทนบุญคุณพ่อแม่



ยิ่งเอามันยิ่งอด ยิ่งสละให้หมด มันยิ่งได้

หลวงพ่อคูณ เป็นตัวอย่างที่ดีในเรื่องของการบริจาคทาน หรือการเสียสละเพื่อให้พุทธศาสนิกชนปฏิบัติตาม ท่านได้ดำเนินชีวิตบำเพ็ญทานบารมีอย่างจริงจังมาโดยตลอดตามแนวของพระมหาเวสสันดร



อย่าลอดคันนาก็แล้วกัน

ญาติโยมถามหลวงพ่อคูณว่า เมื่อให้วัตถุมงคลหรือฝังตะกรุดผู้ใดแล้ว หลวงพ่อได้ตั้งกฎเกณฑ์ในการปฏิบัติหรือต้อง “กรำ” ของอย่างไร ซึ่งก็หมายถึงข้อห้ามที่จะทำมิได้ ในขณะที่มีวัตถุมงคลอยู่ในครอบครอง เพราะเชื่อว่า ของขลังเหล่านั้นจะเสื่อมและไม่มีความศักดิ์สิทธิ์อีกต่อไป ท่านตอบแบบติดตลกว่า “กูไม่ได้ตั้งกฎอะไรด๊อก ลอดอะไรก็ได้ แต่อย่าลอดหัวคันนาก็แล้วกัน”
ที่หลวงพ่อพูดเช่นนี้ มีความหมายว่า ผู้ที่มีวัตถุมงคลนั้นจะลอดอะไรก็ได้ วัตถุมงคลนั้นไม่เสื่อม ยังทรงพุทธานุภาพและเป็นสิริมงคลเสมอตราบเท่าที่ผู้นั้นประพฤติตนเป็นคนดี มีศีลธรรม ไม่ประพฤติชั่วออกนอกลู่นอกทาง เหมือนการลอดคันนาที่ไม่มีผู้ใดกระทำ เพราะคันนามีไว้สำหรับเดิน ไม่ใช่ลอด ผู้ที่มีวัตถุมงคลและปฏิบัติตามจึงเกิดสิริมงคลกับชีวิตตลอดไป


ที่มา https://www.sanook.com/news/7659378/


15 มกราคม 2562

Creating sequence diagram from code

A sequence diagram is really useful for representing system workflow between each entity inside the system.

https://www.websequencediagrams.com is an online tool for generating a sequence diagram from source code easily and you can manage each diagram inside this tool or just copy source code to your own git repository.

We just manage the code like this.

 The tool will generate this sequence diagram automatically. We can also export the diagram to pdf, svg, png format.


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
}
]
}