#latergram


Posted in Photos | Tagged , | Leave a comment

Powering up for packing up Nancy


Posted in Photos | Tagged , | Leave a comment

Metro fresh is tasty


Posted in Photos | Tagged , | Leave a comment

Picture


Posted in Photos | Tagged , | Leave a comment

Walking home


Posted in Photos | Tagged , | Leave a comment

Waiting for flying biscuit


Posted in Photos | Tagged , | Leave a comment

New music, new threads (wearing the other one)! Thanks @johnvanderslice #daggerbeach #kickstarter


Posted in Photos | Tagged , | Leave a comment

Bash Script: Histogram

Second bash script of the day!  This one will histogram the field of a given CSV file numerically.  Optionally, you can specify which field and a precision (which is really just a number of characters, not truly a precision).

histogram() {
  if [ $# -lt 1 ]
  then
    echo "Usage: histogram  [field] [precision]"
    return 0
  fi

  field=1
  if [ $# -gt 1 ]
  then
   field=$2
  fi

  if [ $# -gt 2 ]
  then
    precision="."
    for i in `seq 1 1 $3`
    do
      precision=$precision.
    done

    cat $1 | sort -k $field -n -t ',' | cut -d ',' -f $field | sed -e "s/\($precision\).*/\1/" | uniq -c
  else
    cat $1 | sort -k $field -n -t ',' | cut -d ',' -f $field | uniq -c
  fi
}
Posted in Uncategorized | Leave a comment

Bash Script: MemUse

Quick useful function to get all of the memory in use by a process or set of processes from a bash prompt:

memuse() {
  arr=`ps aux | grep -E $1 | grep -v grep | sed -e 's/[^ \t]*[ \t]*[^ \t]*[ \t]*[^ \t]*[ \t]*//' | sed -e 's/[ \t].*//'`
  sum=0
  for i in $arr
    do
      sum=$(echo "$sum + $i" | bc)
    done
  echo $sum
}
Posted in Uncategorized | Tagged , , , | Leave a comment

@jeanmccoll is sad about Ellen leaving


Posted in Photos | Tagged , | Leave a comment