Advance Linux Programming

(via www.advancedlinuxprogramming.com)

Advanced Linux Programming is published under the Open Publication License, Version 1, no options exercised.

If you're a developer already experienced with programming for the GNU/Linux system, are experienced with another UNIX-like system and are interested in developing GNU/Linux software, or want to make the transition for a non-UNIX environment and are already familiar with the general principles of writing good software, this book is for you...

Cinecutie - New Video editor and composer for Linux

(via www.ubuntugeek.com)

After lot of time spent to learn the cinelerra code, I want to move an other step on the opensource contribute. I’m started from tangolerra project made by Franco Iacomella and after an hard job with svg I made my personal mochup
of Cinelerra called Cutiehd. But when I started to work on the mochup of Cinelerra 2.1cv I tryed to enable again
the support of font antialias (xft), write a draft of Utf-8 support, rewrite some parts of titler code and adapt
the svg plugin from the Cinelerrasv by “Simeon Völkel”.

In place variable substitution with AWK

The content of the input file becomes stdin for rm and awk. rm ignores the input and removes the file, but its file descriptor remains open until both commands, rm and awk is complete. AWK process this "nameless" file and creates a new file:

  { rm $CSV_FILE && awk -F',' -v stid="$ST_ID" '$1 ~ stid {gsub(/&/,"",$7)}1' > $CSV_FILE; } < $CSV_FILE

  • "-v" sets the awk variable that is passed in via shell script variable.
  • "gsub" replaces with "" all occurrence of & in the 7th field. Use "sub" for single/first occurrence substitution or GNU Awk's gensub for more articulated substitutions.
  • "1" is a shortcut which means print the current record:

pecl runkit with php-5.2.x

As of writing, the current pecl runkit-0.9 package does not compile with PHP 5.2+ . Below is how I got the latest installed from svn trunk on CentOS-5.4 with php-5.2.9.

  • Install runkit:
          svn co http://svn.php.net/repository/pecl/runkit/trunk/
          cd trunk
          phpize
          ./configure
          make
          make install
  • Create "/etc/php.d/runkit.ini":
          extension=runkit.so
  • Restart apache and validate with phpinfo.

Note: you would need php-pear and php-devel installed already.

Create Custom Ubuntu Live-CD With Remastersys in Karmic

(via www.ubuntugeek.com)

Remastersys is a tool that can be used to do 2 things with an existing Klikit or Ubuntu or derivative installation.It can make a full system backup including personal data to a live cd or dvd that you can use anywhere and install. It can make a distributable copy you can share with friends. This will not have any of your personal user data in it.

y2k10 bug in SpamAssassin

If running 3.2.x version of SpamAssassin... (check with `spamassassin -V`) there is a y2k10 bug in the FH_DATE_PAST_20XX rule, causing all mails getting an extra 3.4 points:

Reference: SA Bugzilla – Bug 6269

The fix mentioned is to update the rules using `sa-update` and restart spamd. The rules in the update directory at /var/lib/spamasassin will get updated.

With the fix applied you should no longer see FH_DATE_PAST_20XX in the logs.

For a manual fix, update /usr/share/spamassassin/72_active.cf and change:

header   FH_DATE_PAST_20XX      Date =~ /20[1-9][0-9]/ [if-unset: 2006]

to:

header   FH_DATE_PAST_20XX      Date =~ /20[2-9][0-9]/ [if-unset: 2006]

Related reading on sa-update: SpamAssassin RuleUpdates

Permanent SSH Tunnel Between Linux Servers

(via www.brandonchecketts.com)

I recently had a need to create a permanent SSH tunnel between Linux servers. My need was to allow regular non-encrypted MySQL connections over an encrypted tunnel, but there could be many other uses as well. Google can identify plenty of resources regarding the fundamental SSH commands for port forwarding but I didn’t ever find a good resource for setting up a connection and ensuring that it remains active, which is what I hope to provide here...

MySQL Persistent vs Non-Persistent Connections

(via www.robertswarthout.com)

This post will be about benchmarking of MySQL Persistent Connections vs Non-Persistent Connections -- what always seems to be a hot topic among PHPers about what connection type to use when connection to a MySQL database...

MySQL Connection Management in PHP

(via jpipes.com)

This article is intended to highlight various basic topics concerning proper methods of handling connections to MySQL databases in PHP, guidelines for caching dynamic content, and a technique called "lazy loading". Hopefully by the end of the article you'll have learned how to combat a very widespread and potentially devastating scalability problem seen in an enormous number of PHP web applications...

Resolving df and du reporting different output

If df and du give different output of disk usage. Then, most probably it is due to "open file descriptors".

Run `lsof +L1` to get a listing of open files that have been unlinked or removed. Note the file size and kill or restart the respective service.

Reference: walkernews.net

Syndicate content
Comment