http://tnerual.eriogerg.free.fr/cvs.html
[keywords: cvs quick reference card]
2007-09-26
CVS quick reference card
Posted by
Display Name
-
9:10 AM
0
comments
Labels: Version Control
Vim Quick Reference Card
http://tnerual.eriogerg.free.fr/vim.html
[keywords: vim quick reference card]
Posted by
Display Name
-
9:08 AM
0
comments
Labels: Vim
2007-09-21
CPAN mirror
Perl CPAN: cpan.linuxforum.net, very fast! (Dead?)
http://cpan.modperl.cn/
Posted by
Display Name
-
10:39 PM
0
comments
Labels: Perl
Bash: pipeline and subshell
Each command in a pipeline is executed as a separate process (i.e., in a subshell).
[keywords: bash shell pipe pipeline subshell]
Posted by
Display Name
-
4:41 PM
0
comments
Labels: Shell/Scripting
tftp-hpa 0.40
$ in.tftpd -u root -l -c -s /var/lib/tftpboot
[keywords: tftp tftpd]
Posted by
Display Name
-
3:07 PM
0
comments
Labels: Utils
2007-09-19
fdatasync(2)
fdatasync() flushes all data buffers of a file to disk (before the system call returns). It resembles fsync() but is not required to update the metadata such as access time.
Applications that access databases or log files often write a tiny data fragment (e.g., one line in a log file) and then call fsync() immediately in order to ensure that the written data is physically stored on the harddisk. Unfortunately, fsync() will always initiate two write operations: one for the newly written data and another one in order to update the modification time stored in the inode. If the modification time is not a part of the transaction concept fdatasync() can be used to avoid unnecessary inode disk write operations.
Posted by
Display Name
-
4:11 PM
0
comments
2007-09-15
GDB: set breakpoints for a specific thread
gdb> b breakpoint thread 7 if (cond is true)
Posted by
Display Name
-
3:35 PM
0
comments
2007-09-13
Using Perl as Grep or Sed
- perl -ne '/pattern/ and print' ...
- perl -lne '/pattern/ and print' ...
- perl -pe 's/foo/bar/' ...
- perl -pe 's/^foo.*//' ...
- perl -lpe 's/^foo.*//' ...
- perl -pi -e 's/foo/bar/' ...
- perl -pli -e 's/foo/bar/' ...
Posted by
Display Name
-
10:34 PM
0
comments
Labels: Perl
diff options
- diff -Npru ...
- diff -x CVS -x .svn ...
- diff -I '\$Revision' -I '\$Id' ...
- diff -I '\$Revision\|\$Id' ...
Posted by
Display Name
-
11:22 AM
0
comments
Labels: Utils
2007-09-06
How to concatenate two strings in SQL statement?
.. ...
Note that there are two variations of the equals and not equals operators. Equals can be either = or ==. The non-equals operator can be either != or <>. The || operator is "concatenate" - it joins together the two strings of its operands. The operator % outputs the remainder of its left operand modulo its right operand.
... ...
Posted by
Display Name
-
2:32 PM
0
comments
Labels: Databases
2007-09-05
Pitfall of strerror_r() of GNU libc
int strerror_r(int errnum, char *buf, size_t n);
CONFORMING TO: SVID 3, POSIX, 4.3BSD, ISO/IEC 9899:1990 (C89).
strerror_r() with prototype as given above is specified by SUSv3, and was in use under Digital Unix and HP Unix. An incompatible function, with prototype
char *strerror_r(int errnum, char *buf, size_t n);
is a GNU extension used by glibc (since 2.0), and must be regarded as obsolete in view of SUSv3. The GNU version may, but need not, use the user-supplied buffer. If it does, the result may be truncated in case the supplied buffer is too small. The result is always NUL-terminated.
Posted by
Display Name
-
5:52 PM
0
comments
lftp colors
Time ago when I was using Red Hat Linux 9.0, lftp's `ls' command could show different colors for different types of files, just like what the Linux's `ls' command did. It's cool and I like it. But after I switched to Ubuntu 6.06 lftp's colors have gone! I got back a Red Hat 9.0 box and run lftp and typed `set -a'. From the output I got 2 lftp settings: color:use-color and color:dir-colors. Seems good. Copy these 2 settings out and save as ~/.lftprc. All is done. Enjoy lftp'ing.
Posted by
Display Name
-
3:00 PM
0
comments
Labels: Utils
Dixie Chicks - So Hard
We didn't know how hard it was
Living on nothing
But what the wind would bring to us
Now we've got something
I can imagine fighting for
So why is fighting all that we're good at anymore
And sometimes I don't have the energy
To prove everybody wrong
And I try my best to be strong
But you know it's so hard
It's so hard
It's so hard when it doesn't come easy
It's so hard when it doesn't come fast
It's so hard when it doesn't come easy
It's so hard
It felt like a given
Something a woman's born to do
A natural ambition
To see a reflection of me and you
And I'd feel so guilty
If that was a gift I couldn't give
And could you be happy
If life wasn't how we pictured it
And sometimes I just want to wait it out
To prove everybody wrong
And I need your help to move on
Cause you know it's so hard
It's so hard
It's so hard when it doesn't come easy
It's so hard when it doesn't come fast
It's so hard when it doesn't come easy
So hard
I can live for the moment
When all these clouds open up for me to see
And show me a vision
Of you and me swimming peacefully
Last night you told me
That you can't remember
How to feel free
It's so hard when it doesn't come easy
It's so hard when it doesn't come fast
It's so hard when it doesn't come easy, easy
It's so hard
Posted by
Display Name
-
12:34 PM
0
comments
Labels: Music
Dixie Chicks - Baby Hold On
We might never live those days gone by
But we can try
Good morning
Let's kick the babies out of bed
How bout you and me instead hanging on
Not up and gone
(Baby, hold on)
Let's start this over
(Baby, hold on)
We're not much older now
(Baby, hold on)
If you still see what I see
Keep holding on
Hold on to me
Baby, it's good to see you smile again
I know we can't escape
So let's pretend
We're someplace else
It's a new day
Let's look at all we've got
It's everything we thought
We ever wanted
It's beautiful
(Baby, hold on)
Let's start this over
(Baby, hold on)
We're not much older now
(Baby, hold on)
If you still see what I see
Keep holding on
Hold on to me
I look across the room and catch you staring at me
And see the love we almost left behind
So lead me by the hand and let's make up
Let's make up for lost time
(Baby, hold on)
Let's start this over
(Baby, hold on)
We're not much older
(Baby, hold on)
If you still see what I see
Keep holding on
(Baby, hold on)
Hold on to me
(Baby, hold on)
Just hold on to me
(Baby, hold on)
Hold on to me
Keep holding on
Hey, it might never be the same
We might never live those days gone by
But we can try
Posted by
Display Name
-
12:20 PM
0
comments
Labels: Music
[C] Non-static local vars locate on stack?
刚才讨论问题时发现公司两大主力 developer 竟不清楚这个问题,看来不能仅通过这些技术细节来判断一个人的能力大小。引申思考:面试题的科学性?
Posted by
Display Name
-
11:02 AM
0
comments
Stack size of processes/threads
- ulimit -s
- getrlimit(RLIMIT_STACK)
- setrlimit(RLIMIT_STACK)
- pthread_attr_setstacksize()
- pthread_attr_getstacksize()
SEE ALSO: Advanced Linux Programming, POSIX Thread Programming
Posted by
Display Name
-
10:49 AM
0
comments
Labels: *nix, C/CPP, Shell/Scripting
bashrc grows to 1800 lines
俺的 bashrc 今天涨至 1800 行整,留念 :)
Posted by
Display Name
-
9:19 AM
0
comments
Labels: Shell/Scripting
2007-09-04
Dixie Chicks - Taking The Long Way
前天去华联超市看到 Dixie Chicks 的专辑《Taking the Long Way》,RMB 48,没舍得买 :-(
Posted by
Display Name
-
2:53 PM
0
comments
2007-09-03
bash: 如何判断 stdout 是否是个 terminal
if [ -t 1 ]; then ...
SEE ALSO: isatty(3)
Posted by
Display Name
-
9:26 AM
0
comments
Labels: Shell/Scripting
2007-09-01
Wikipedia not available today
今天又不能访问 wikipedia, 昨天还好好的, 不晓得是不是又被 GFW 给 block 了?
Posted by
Display Name
-
5:24 PM
0
comments
Labels: Misc
Terminal 上常见的几个 signal
- SIGHUP: Hangup detected on controlling terminal or death of controlling process
- SIGINT: Interrupt from keyboard (Ctrl-C)
- SIGQUIT: Quit from keyboard (Ctrl-\)
- SIGTSTP: Stop typed at tty (Ctrl-Z)
- SIGCONT: Continue if stopped (fg)
- SIGTTIN: tty input for background process
- SIGTTOU: tty output for background process (一般情况下 terminal 没有 enable 这个 signal, 可以用 `stty tostop' 来 enable)
Posted by
Display Name
-
5:14 PM
0
comments
C++ vs Java vs Python vs Ruby : a first impression
一哥们儿用 Red-Black tree 的实现对四种 languages 做的比较, 有些意思, 收藏.