Tuesday, June 22, 2010

Move to new Site

I start new website since May.

Let move to http://www.amaudy.com

Monday, April 5, 2010

เมษาหน้าร้อน

ร้อนนี้ เกือบ 40 องศา นะเธอ

Thursday, April 1, 2010

Blognone April fools day

เล่นกันแต่เช้า















รอดูเวบอื่น จะเล่นอะไรปีนี้

Wednesday, March 31, 2010

เมื่อนาย ก สิ้นหวัง

นาย ก : สิ้นหวังวะ อยากฆ่าตัวตาย ทำไงดีวะ?
นาย ข : โดดน้ำสิ
นาย ก : กูว่ายน้ำไม่เป็นนะ
นาย ข : ?!?!?!

Sunday, March 7, 2010

เวรกรรมมีจริง

เวรกรรมมีจริง
นาย ก : "เห็นมั๊ยล่ะ! เวรกรรมมีจริง ใครปลูกอะไร ก็ต้องได้สิ่งนั้น"
นาย ข : "จริงเหรอครับ"
นาย ข : "ทำไมผมปลูกถั่วเขียว มันได้ถั่วงอกทุกที"

มติชนสุดสัปดาห์ ฉ. ๑๕๔๒ หน้า ๔๐

PHP Framework list

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

Thursday, March 4, 2010

FOCUS

F - Find A Project
O - Occupy Yourself With This Project
C - Concentrate All Your Time On This Project
U - Understand That Nothing Is More Important Than This Project
S - Succeed With This Project

Tuesday, March 2, 2010

การสร้าง virtual host บน Ubuntu 9.10

การสร้าง virtual host บน Ubuntu 9.10

1. แก้ไข /etc/hosts เพิ่มชื่อเวบที่ต้องการ ตัวอย่างเช่น ต้องการเพิ่มเวบ drupal.localhost ก็เพิ่มเป็น

127.0.0.1 drupal.localhost


2. คักลอกไฟล์ /etc/apache2/sites-available/default ให้เป็นชื่อเดียวกับชื่อเวบ เช่น

cp /etc/apache2/sites-available/default /etc/apache2/sites-available/drupal.localhost


3. แก้ไข /etc/apache2/sites-available/drupal.localhost

4. ไปที่ /etc/apache2/sites-enabled/ แล้วสร้างลิงค์ไปหา /etc/apache2/sites-available/drupal.localhost

cd /etc/apache2/sites-enabled/
sudo ln -s ../sites-available/drupal.localhost .


5. รีสตาร์ท Apache

sudo /etc/init.d/apache2 restart


เท่านี้ก็เรียบร้อย



Resource:

Wednesday, February 24, 2010

search & replace string from terminal

I want to search & replace string in 10MB of text file. The Gedit spend 20 - 30 minutes to finish this task but I can finish in 2 second by this command

cat source_file.txt | sed 's/searchstring/replacestring/g' > output.txt

pretty cool!

Tuesday, January 26, 2010

Bill Davenhall: Your health depends on where you live

จาก TedTalk เป็นอีกไอเดียที่ดีเหมือนกัน

Monday, January 25, 2010

run php as cron job at Webfaction.com

short command for run php script as cron job


* * * * * /usr/local/bin/phphome $HOME/path/to/php_script.php > $HOME/path/to/output.log 2>&1


pretty simple.

Tuesday, January 19, 2010

DEVRadio #21 ระวังบัตรเครดิตนะพี่ โดย อ.นิรุธ อำนวยศิลป์

สมัครสมาชิกรายการของอาจารย์นิรุธไว้ที่ Youtube เห็นว่าตอนนี้เป็นประโยชน์ต่อวงกว้าง เลยเอามาแปะไว้ที่บล๊อกด้วย

คร่าวๆ ก็ควรระวังการใช้งานบัตรเครดิตในที่ต่างๆ เพราะถ้ามีข้อมูลบนบัตรครบ เช่น หมายเลขบัตร ๑๖ ตัว และหมายเลขหลังบัตร ก็สามารถทำธุรกรรมผ่านทางอินเตอร์เนตได้แล้ว

ระวังะตกเป็นเหยื่อไม่รู้ตัว



นอกจากกลัวห้ามใจตัวเองไม่อยู่แล้ว เรื่องความปลอดภัยเป็นอีกเหตุผล ที่ผมไม่ยอมทำบัตรเครดิตให้ตัวเองซักที

Wednesday, January 13, 2010

Use Gmail smtp for send email in Magento

I building website using Magento, so many time I need to test email sending but I got some problem because my environment is Windows.
Windows not false just not good ebough for this point.

So I need to modified Magento core file to use Gmail smtp for sending email.

Just follow this instruction.

Open and modified /app/code/core/Mage/Core/Model/Email/Template.php

in function function send($email, $name=null, array $variables = array())

replace


try {
$mail->send(); // Zend_Mail warning..
$this->_mail = null;
}


with


$config = array(
'ssl' => 'ssl',
'port' => 465,
'auth' => 'login',
'username' => 'youtgmailusername@gmail.com',
'password' => 'youtgmailpassword'
);

$transport = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $config);
try {
$mail->send($transport);
}


Have a nice day.