Noyzi!!a’s Blog


perl telnet reboot router

Posted in จับฉ่าย by Noyzi!!a on the January 28th, 2008

Router ที่บ้าน (Yasda) ฟรีจาก Cat เปิดทิ้งไว้พอตอนเช้าทีไรตายสนิท ต้องทำการปลุกผีด้วยการ reboot ทุกที
ตอนแรกนั่งเขียน shell ให้ telnet ไป reboot ทุกๆเช้า “โฮก”บุญไม่ถึง ทำไม่สำเร็จ ลุงต่อเลยแนะนำให้ใช้ perl แทน

ตามนี้เลยครับ

use Net::Telnet;$telnet = new Net::Telnet ( Timeout=>10, Errmode=>’die’);
$telnet->host(’192.168.1.1′);
$telnet->port(’*******’);
$telnet->open();
$telnet->waitfor(’/login: $/i’);
$telnet->print(’*********’);
$telnet->waitfor(’/password: $/i’);
$telnet->print(’*********’);
$telnet->waitfor(’/\$$/i’);
$telnet->cmd(”reboot\n”);
$telnet->waitfor(’/\$$/i’);
$telnet->cmd(”quit\n”);
print “End \n”;

เสร็จแล้วก็เอาไปใส่ crontab ตั้งเวลาให้รันทุก 6.00 ซะตื่นมาก็เล่นได้เลยไม่ต้องเสียอารมมานั่ง Reboot เอง

http://www.perlfect.com/articles/telnet.shtml

http://search.cpan.org/~jrogers/Net-Telnet-3.03/lib/Net/Telnet.pm

google & thai

Posted in จับฉ่าย by Noyzi!!a on the January 22nd, 2008

เจออะไรแปลกใน google เดี๋ยวนี้มันแปล title ให้ด้วยแฮะ

ผม search “new in bash 3″ ซึ่งผลลัพธ์เจอเว็บไซต์ http://tiswww.case.edu/php/chet/bash/NEWS ในหน้านั้นไม่มีภาษาไทยนะแต่ทำไมใน title ของ google มันมีภาษาไทยหว่า

new features list ของ bash 3

google analysic

Posted in จับฉ่าย by Noyzi!!a on the January 18th, 2008

วันนี้เข้าไปดู สถิติใน google analysic พบว่าสามวันมานี้มีคนเข้ามาเยอะผิดปรกติ

มี ip จากฝรั่งยุโรปเข้ามาด้วย
Poland 6
Germany 5

 

 

 

# Browser

IE  66.76%

Firefox  30.59%

 

 #OS

Windows  86.44%

Linux 12.23%

Macintosh  1.33%

เอวเธอ

Posted in จับฉ่าย by Noyzi!!a on the January 17th, 2008


Hanuma - MyVideo

ขอบคุณพี่ต่อครับ :) สำหรับสิ่งดีๆ

mplayer กับไฟล์ภาษาไทย

Posted in จับฉ่าย by Noyzi!!a on the January 14th, 2008

บางครั้งโปรแกรม mplayer มันจะเปิดไฟล์ที่ชื่อมีตัวแปลกๆ ไม่ได้ (รวมไทยด้วย)

วิธีแก้

nano /usr/share/applications/mplayer.desktop

แก้ Exec เป็น%F

Exec=gmplayer %F

*จำไม่ได้แล้วว่าเจอมาจากไหน

หรือไม่ก็

emerge gnome-mplayer

ซะ ไม่รกหูรกตาด้วย

Gentoo User : Gnome VS KDE

Posted in Gentoo by Noyzi!!a on the January 12th, 2008

ไม่รู้ผมคิดไปเองหรือป่าว แต่รู้สึกว่า ชุมชน Gentoo กระตือรือร้นต่อ KDE มากกว่า Gnome สังเกตุจาก Package ใหม่ๆ ที่เข้ามาใน portage ถ้าตัวแม่ออกมาไม่นาน ก็จะเข้า portage เลยไม่เหมือน Gnome ที่รออีกสองสามเดือนกว่าจะเข้า portage

เฮ้อ QT มัน build นานจริงๆ นะ

เอานี้มาฝาก

gentoo-dev ml wrote: Von: “Wulf C. Krueger” <philantrop@gentoo.org>
An: gentoo-dev@lists.gentoo.org
Betreff: [gentoo-dev] New eclasses for KDE 4
Datum: Sat, 12 Jan 2008 00:22:34 +0100
Reply-to: gentoo-dev@lists.gentoo.org
Benutzerprogramm: KMail/1.9.7

Hello, fellow Gentoo devs!

Attached you’ll find the new eclasses for KDE 4. We’d like to commit them
on Sunday, 14th, to be able to get KDE 4.0.0 into the official tree

(package.masked, though).

http://forums.gentoo.org/viewtopic-t-597872-postdays-0-postorder-asc-start-225.htmlตอนนี้ labtop จับลง ubuntu ซะแล้วละแต่ยังทำ stage4 ของ gentoo เก็บไว้ไม่รู้จะทนใช้ได้นานอีกเท่าไหร่กับ ubuntu สภาวะแววล้อมมันไม่คุ้น สงสัยเพราะความเคยชินที่ gentoo มี lib มาพร้อม  น่าเศร้าใจ

now() I can’t write thai…. !!!!!!!!

Posted in จับฉ่าย by Noyzi!!a on the January 11th, 2008

now() I can’t write thai…. !!!!!!!!

now() I can’t write thai…. !!!!!!!!

now() I can’t write thai…. !!!!!!!!

now() I can’t write thai…. !!!!!!!!

now() I can’t write thai…. !!!!!!!!

now() I can’t write thai…. !!!!!!!!

now() I can’t write thai…. !!!!!!!!

now() I can’t write thai…. !!!!!!!!

now() I can’t write thai…. !!!!!!!!

now() I can’t write thai…. !!!!!!!!

now() I can’t write thai…. !!!!!!!!

now() I can’t write thai…. !!!!!!!!

now() I can’t write thai…. !!!!!!!!

กฤษณาสอนน้อง

Posted in จับฉ่าย by Noyzi!!a on the January 9th, 2008

กฤษณาสอนน้อง

    พฤษภกาสร
อีกกุญชรอันปลดปลง
โททนต์เสน่งคง
สำคัญหมายในกายมี
นรชาติวางวาย
มลายสิ้นทั้งอินทรีย์
สถิตทั่วแต่ชั่วดี
ประดับไว้ในโลกา

* สมเด็จกรมพระยาปรมานุชิตชิโนรส