Posts

Using git with my case #1

Using git with my case #1 Display branch >>> git branch -a -v >>> git branch -r ; display remote branches >>> git remote update origin --prune Delete branch >>> git branch -d ; delete local branch >>> git push origin : ; delete remote after delete local branch >>> git push origin --delete ; delete remote Get data from remote ( origin ) >>> git fetch origin ; get info of remote branch to our local machine note*     git pull do         1. git fetch         2. git merge Diff local with remote or others >>> git diff >>> git diff ; diff local branch with remote branch Fetching >> git fetch ; fetch all branches heads >> git fetch --tags ; fetch all tags Start Hotfix 1. Check latest tag     >> git fetch --tags 2. Start hotfix tags     >> git tags ; check latest tags     >...

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                           ...

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.

Something should keep in mind

'''It's not a problem, just need to be careful when doing this sort of thing. Guessing leads to hard to track down problems because things aren't exactly how they should be''' ... Kirit (20120202)

Mount hfs+ system ( especially mac drive )

Hi pow 1. Let's do >>> sudo apt-get install hfsprogs 2. Unmount that drive, then >>> sudo fsck.hfsplus /dev/sdb2 or sudo fsck.hfsplus -f /dev/sdb2 Above are for checking its health 3. Do mount! >>> sudo mount -t hfsplus -o force,rw /dev/sdb2 /media/ ,just that my friend! :)