Fight Back against universal surveillance (aka Big Brother)

Today, FEBRUARY 11TH 2014, is “the day we fight back” against universal surveillance by our governments, and specifically the NSA (aka Big Brother).  Please add your voice to this protest, and add their black banner to your site/s.

P.S. It seems that would charge me $30 to change the background colour of my page.  This is absurd, I will have to look for or likely make a better blog system.

Posted in Uncategorized | 2 Comments

svn ignore dammit

“Thank-you” svn for such a hideous, bogus and difficult way to ignore files.

So I wrote a script svn-ignore-all:


# svn-ignore-all

# usage: 
#   1. run svn status to see what is going on at each step 
#   2. add or commit all files that you DO want to have in svn
#   3. remove any random files that you don't want to svn:ignore
#   4. run this script to svn:ignore everything marked '?' in output of `svn status`

svn status |
grep '^?' |
sed 's/^? *//' |
while read f; do
    d=`dirname "$f"`
    b=`basename "$f"`
    ignore=`svn propget svn:ignore "$d"`
    if [ -n "$ignore" ]; then
    svn propset svn:ignore "$ignore" "$d"

Also, to ignore specific list of files / pathnames, we can use this variant svn-ignore. I guess svn-ignore-all should really be like xargs svn-ignore.


# svn-ignore

# usage:
#   svn-ignore file/to/ignore ...

for f; do
    d=`dirname "$f"`
    b=`basename "$f"`
    ignore=`svn propget svn:ignore "$d"`
    if [ -n "$ignore" ]; then
    svn propset svn:ignore "$ignore" "$d"

One more thing: I tend to pollute my svn checkouts with many random files. When it’s time to commit, I move those files into an ‘old’ subdirectory, and tell svn to ignore ‘old’.

Also posted here:

Posted in Uncategorized | Leave a comment

Image | Posted on by | Leave a comment

9 reasons to love Pandora

Laptops and phones can be good, and do have some advantages …
but here are 9 reasons I love my Pandora:

 - fits in pocket                (2)
 - great gaming controls     (1) (2)
 - full ASCII+ keyboard      (1)     (3)
 - superb audio              (1) (2) (3)
 - excellent battery life        (2)
 - 2 x SD cards & USB        (1) (2) (3)
 - full open GNU/Linux OS    (1)     (3)
 - indie hardware project    (1) (2) (3)
 - great community & devs            (3)

(1) few if any phones have this
(2) few if any laptops have this
(3) few if any other pocket gaming boxes have this


That’s 6 ways a Pandora beats a phone, 6 ways it beats a laptop, 6 ways it beats other pocket gaming boxes. And 3 ways it beats all of the above.

Few if any other devices can score more than 3/9, on this list of very desirable features.

Pandora is elite and unique!

Posted in Uncategorized | 3 Comments

Don’t Feed The Trolls

Don’t Feed The Trolls

a maxim for life

Posted in Uncategorized | 2 Comments

simple linux distro [idea]

I propose to create a simple Linux distro:

– based on (beyond) Linux from scratch, ports, sources via DVCS (git, hg, git svn)
– primarily for Open Pandora, also 686 / x86_64 PC
– include source code, dev tools, dev libs
– compressed single-file executable packages based on Pandora PND with some fixes
– separate defaults vs configuration
– include source configuration and compiled objects, for quick hacking
– support projects by donation, rating and feedback; a friendly nagware, enabled by default
– use get ideas from “suckless” Linux projects, such as static linking, musl libc
– all code changes reviewed by two or more maintainers before declared “stable”
– fix and avoid slow and broken things

Posted in Uncategorized | Leave a comment

CSV data processing

I wrote a couple tools in perl, for CSV data processing:

dbicsv – can feed CSV data into or out from a database

csvproc – can process CSV data using a perl one-liner

Please let me know if you find these tools useful, to suggest features, or if you’re interested but don’t see how to use them.  Don’t let my humility deceive you; these are very useful tools!

Some examples:

export DB_DBMS=postgrsql DB_NAME=test
dbicsv 'select * from foo;' >foo.csv
dbicsv 'insert into foo values (?, ?, ?);' <foo.csv
dbicsv 'select * from sp_proc($Col1, $Col2);' <in.csv >out.csv

csvproc '$name = uc $name' <in.csv >out.csv
csvproc -out id,name,date 'fix_date($date)' <in.csv >out.csv
csvproc -filter '$name = lc $name; $salary >= 1e6;' <in.csv >out.csv

how to use dbicsv:

Usage: dbicsv [options] sql-query [param ...]

Runs an SQL query, returns CSV data.

  option   description            default

  -dbms ?  DBMS, determines DSN   $DB_DBMS || InterBase
  -dsn ?   DBI data source name   $DB_DSN || (from DBMS)
  -db ?    database name          $DB_NAME
  -user ?  database user          $DB_USER || $ISC_USER || "sysdba"
  -pass ?  database password      $DB_PASS || $ISC_PASSWORD || "sysdba"
  -host ?  database hostname      $DB_HOST
  -port ?  database port          $DB_PORT

  -in      input data from stdin  $DB_IN
  -head ?  column head = -|O|I|IO $DB_HEAD || IO

  -debug   show more info         $DB_DEBUG
  -help    show this message

how to use csvproc:

Usage: csvproc [options] mapping

Process CSV data with a small perl program.

  option   description

  -filter             filter lines, mapping returns boolean
  -out a,b            output fields a, b (can declare new fields)
  -help               show this message
  -debug              show debug info including the generated perl code

utility function examples:

  zero_pad($Var, 4);
Posted in Uncategorized | Leave a comment