selfjungle Just another WordPress weblog


perl regexp – threat whole string as one line

s - Treat the whole string as one line, so that even /./ will match a "newline" character.


my $multiline =
  "In the town where I was born,\n" .
  "Lived a man who sailed to sea,\n" .
  "And he told us of his life,\n" .
  "In the land of submarines.";

if ($multiline =~ /born,.Lived/s) {
  print "found\n";   # found in deed
} else {
  print "not found\n"; 
Tagged as: No Comments

xterm colors

The blue is too dark for my eyes, specially then it's used by colorgcc to highlight line numbers.

...and I just can't get angry with a cheerful orange cursorColor 😀


xterm*foreground:       #ffffff
xterm*background:       #000000
xterm*cursorColor:      orange
xterm*color4:           #526fcf
Tagged as: No Comments

find and remove files

With rm and find:

rm $(find . -name *.gcda)

Or with the -exec paramter of find

find . -name *.gcda -exec rm -rf {} \;
Tagged as: No Comments

git tag

Tag commit:

git tag -m <msg> <tagname> <commit>

Push tags (not done by default):

git push --tags <remote> <branch>

Fetch tags:

git fetch --tags <remote> <branch>


git remote update <remote>
Tagged as: No Comments

choose default answers at make oldconfig

Linux command yes outputs parameter string.

yes "" | make oldconfig
Tagged as: No Comments