Wednesday, November 25, 2015

Handy howmany commandy

Here's a handy little bit of... well it isn't really SQL, is it? Shell scripting and SQL*Plus, more like.

tcsh & csh


alias howmany "echo 'select count(*) from table;' | sqlplus -s 'xxxxxx/xxxxxx@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxxxx)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxxxxx)))'"


sh & bash


alias howmany="echo 'select count(*) from table;' | sqlplus -s 'xxxxxx/xxxxxx@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxxxx)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxxxxx)))'"

(for ksh use either) - and then...

$ howmany

Enjoy!

p.s. I'd love to add a pipe to

sed -e '/^$/ d; s/^\s-*//g'

but the dollar sign screws things up, at least in tcsh. Oh well!

Wednesday, November 18, 2015

Sunday, November 15, 2015

Hard-to-read Podcasts

If you use the iOS Podcasts app, you've probably had occasion to swear at the producers of a podcast for their graphics and how they translate into dark text on a dark background. It's even worse in low light.


Well swear no more! At least not about this. It turns out there's a setting for that! Unfortunately, because this is iOS, you have to open the Settings app. Go there and choose Podcasts. And there aren't that many settings, so find this one, Custom Colors, and turn it off


And enjoy more podcasts!

Saturday, November 14, 2015

Don't take checks from strangers

I don't tend to be alarmist, but this article has an important warning... when you deposit a check, everything you write on it can go back to whoever issued it - your account number, social security number... huge identity theft problem. 

http://www.westernjournalism.com/alert-people-are-getting-checks-in-the-mail-from-walmart-when-they-deposit-them/