Copying Big Files

เวลา copy ไฟล์ใหญ่ๆ ข้ามเครื่องใน network เดียวกันแล้ว ส่วนใหญ่เราก็มักจะใช้การ mount network drive ขึ้นมา หรือไม่ก็ copy ผ่านมาทาง SSH แต่วิธีพวกนี้มักจะช้า เพราะต้องเสีย overhead เรื่องของ encryption / overhead ของ protocol ทำให้ได้ความเร็วไม่มากเท่าที่มันควรจะเป็น

ไปเจอวิธีทริกการ copy อย่างว่องไวจาก MySQL Performance Blog จดไว้ซะหน่อย กันลืม (ทั้งสองเครื่องต้องมีโปรแกรม netcat (nc) อยู่ด้วย)

ที่เครื่อง source:
tar -cf - . | nc [target_ip] [port]

ที่เครื่อง target:
nc -l [port] | tar xvf -

วิธีการคือ ส่งข้อมูลดิบๆ ข้ามเครื่องแบบไม่ต้อง encode โดยใช้ netcat เป็นทั้งตัวรับและตัวส่ง ถ้าหากต้องการทำทีละหลายๆ ไฟล์ ใช้ tar ช่วยด้วยตามแบบในโค้ด ก็จะสะดวกดี

Ubuntu Compact Theme for Netbook

After 3 days playing with Ubuntu Netbook Remix on Acer Aspire One, I’ve found the 1024×600 display is too limited. The human-netbook-theme is not fully optimized for such small screen. So i modify it a little to make it looks better.

Things I’ve added

  • Reduce spaces between menu items
  • Use small icon in dialogs
  • Use Tangerine icon set instead of Human set. It gives better contrast

Screenshot:

Using human-netbook-theme


Using human-compact

Download:
You can download it here: Human Compact Theme

Installation:
Just open Preferences -> Appearance and drag the downloaded file into that window

Feedback:
Comments are welcome

My TNWA Presentation

Presentation ที่เอาไปพูดในงาน Thailand Next Web Apps 2008 แนะนำเรื่องเว็บ Fwdder.com พูดเรื่องสถิติเล็กๆ น้อยๆ แล้วก็เทคโนโลยีที่อยู่เบื้องหลัง

Fwdder : share your forward mails
View SlideShare presentation or Upload your own. (tags: fwdder tnwa)

Girl from Mars

ได้ไปงาน Remix Sea 08 ของ Microsoft เมื่อวานนี้ ในงานได้ดูโฆษณา “Your Digital Lifestyle” ก็เป็นความพยายามของ Microsoft ที่จะเข้ามามีส่วนร่วมกับกิจกรรมต่างๆ ในชีวิตของเรา ชอบตรงที่ใช้เพลง Girl from Mars ของ Ash แต่เอามาคัฟเวอร์โดยวงอินดี้จากแคนาดา ชื่อว่า Magneta Lane

เพลงเพราะดี แต่ส่วนเนื้อหานี่ยังรู้สึกไม่เนียนเท่าไหร่ ความรู้สึกมัน “PC” มากๆ (คนเคยดูโฆษณาของ Apple คงเข้าใจ)

My History

คนอื่นเล่นกันไว้หลายคนแล้ว (pphetra, sugree, mk) เอาของตัวเองมาให้ดูบ้าง

Tabris:~ pittaya$ history|awk ‘{a[$2]++} END{for(i in a){printf “%5d\t%s\n”,a[i],i}}’|sort -rn|head
114 cd
93 ls
62 vi
40 wget
32 ssh
20 rm
20 find
12 python
10 mv
8 mdls