Posts

Showing posts from April, 2014

Think of using Xvfb

Xvfb - X Virtual Frame Buffer Xvfb  is an X server that can run on machines with no display hardware and no physical input devices. It emulates a dumb framebuffer using virtual memory. ผมค้นพบโปรแกรมนี้ เนื่องจากความต้องการที่จะทำ UI Test ซึ่งเป็นส่วนประกอบย่อยของระบบ Continuour Integration ที่ผมพัฒนาอยู่ (ตอนที่เขียนบทความนี้ โครงงานที่ทำอยู่หันไปใช้ phantomjs แล้ว :P ) ผมเห็นความเป็นไปได้ในการเอาโปรแกรมนี้ไปใช้ซึ่งมีคนเอาไปทำแล้วอย่างเช่น plugin ที่ใช้ใน jenskin (CI). และแน่นอนผมคาดว่ามันจะสามารถทำงานกับ selenium ทีเวลาที่ตัว selenium ทำงานจะเปิดหน้า webbrowser ขึ้นมา สำหรับงานเทสระบบเว็ป โปรแกรมนี้น่าจะเป็นอะไรที่เข้าทางเลยทีเดียว :) Reference xvfb -> http://www.x.org/archive/X11R7.7/doc/man/man1/Xvfb.1.xhtml buffer - > http://en.wikipedia.org/wiki/Buffer_(computer_science) frame buffer -> http://en.wikipedia.org/wiki/Framebuffer jenskin-xvfb-plugin -> https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin

Create sequence with zero padding

Hmm I got to pull series of git source from 01-13. But I'm too lazy so I googled then I found program `seq` I don't know it much but it can >>> seq 1 10 1 2 3 4 5 6 7 8 9 10 >>> seq -w 1 10 01 02 03 04 05 06 07 08 09 10 >>> seq -w 01 10 01 02 03 04 05 06 07 08 09 10 Aha, So I see the light!! >> for id in `seq -w 01 13`; do git pull XXXXX$id; done; Yeh,! Many thank to links below!! :) http://stackoverflow.com/questions/6446672/generating-huge-lists-of-numbers http://stackoverflow.com/questions/8789729/zero-padding-in-bash

Using hexdump to check special chars on files

When you suspect on some word that will hide something inside. And I already have compare file. First thing I will try >>> diff file1 file2 Then I know more which word, so I >>> grep file1 And I'm not sure what wrong with it , I will >>> grep file1 | hexdump -C got thing like 00000000  48 65 6c 6c 6f 20 48 6f  77 20 61 72 65 20 79 6f  |Hello How are yo| 00000010  75 20 74 6f 64 61 79 0a  0a                       |u today..| 00000019 But I think it useless, I decide to >>> grep file1 | hexdump -c got this 0000000   H   e   l   l   o       H   o   w       a   r   e       y   o 0000010   u       t   o   d   a   y  \n  \n                             0000019 the default thing is here 0000000 6548 6c6c 206f 6f48 2077 7261 2065 6f79 0000010 2075 6f74 6164 0a79 000a                0000019 That's it. Thank Kirit :)

Change GTK2 Themes to Clear Plastic than oxygen-gtk is make Terminator looks better :)

Currently, I use Kubuntu 13.04. I can't remember when I started found border of Terminator gone. But I found some tip from jippie that suggest to change gtk2 theme to other that oxygen-gtk. Then WOW Its look better, Still borderless but NO space between application's window and viewport ( i try to describe view-region in our display ). Yeh Thank  http://askubuntu.com/questions/377133/does-borderlessmaximizedwindows-false-still-work-with-kubuntu-13-10 *** some info in that link said like So, this feature was added to the oxygen window decoration. Unfortunately, this change didn't make it into the 4.11 release, so we'll have to wait until KDE 4.12 in kubuntu 14.04 (see  bug 324011 ). so I will waiting for it.