Tips

These are short observations on Linux, it's use, programming, operation, and configuration. Mostly, they are derived from my own experiences installing, configuring and using Linux systems, from embedded systems to desktops to servers.

Programmers toolkit - Sign of an integer

Back in October, 2018, a discussion in the usenet comp.lang.c newsgroup addressed (among other things) the original poster's complaint about the return value of the C standard strcmp() function. The poster contended that the strcmp() function should return one of three values: -1 if the first string was lexically "less than" the second string, 0 if the strings were lexically "equal", and +1 if the first string was lexically "greater than" the second string.

Articles: 

Programmers toolkit - C api sprintf-like mysql_query()

I've recently taken up writing some C code to access mysql databases. One tedious part of that process is the preparation of query statements (not "prepared statement" queries, however) using program-supplied values.

Typically, to me, that means

Articles: 

NFS Micro-HOWTO

The "Network Filesystem" (NFS) is not difficult to set up. Here's a micro-howto that I use as a guide for my NFS setup.

Articles: 

Shell Tricks

Coding in sh or bash can be challenging. Here are some tricks I've learned over the years

Extracting fields from lists

I have a list of items in $LIST; each item is separated from each other item by a comma, and individual items may contain spaces.

~ $ LIST="abc,def ghi,jkl"
~ $ echo [$LIST]
[abc,def ghi,jkl]

Articles: 
System Management: 

PHP All-in-one Download page

On response to a trigger on one web page, I want to use PHP to generate and display a new web page, and at the same time, send an associated file as a download.

For example, the user selects an "Export recipes" option in a PHP/MySQL web-based recipe management application, which causes

  1. the page to change to a "Download in progress" page, and
  2. a file containing the selected recipes to be sent to the client's browser to be saved as a "download".

How can I do this?

Articles: 

Some notes on home network configuration for hosting personal websites

A friend is trying to set up his home computer to expose a website to the internet, and is having some problems getting it to work. In assisting him, I realized that some of the information I've given him may be of use to others.

So, here it is.

Articles: 
System Configuration: 

Pages

Subscribe to RSS - Tips