Entries from December 2008 ↓
December 18th, 2008 — Technology
In the previous post I mentioned a python script I was using with curl to send me a SMS message. Its a pretty quick and dirty one, but here is the script I use. Since these are quick messages meant for my phone – I don’t do much with the body. And I just use this with a GET style URL, although the python cgi lib could just as easily handle a POST. So I call it like this:
http://www.domain.net/cgi-bin/sendmemail.py?to=number@txt.att.net&subject=printing_done
I use this via curl in other scripts as a sort of notification system.
Continue reading →
December 18th, 2008 — Random Observation
At work I’m doing a bunch of printing of some large documents. Â I wanted a way of being notified when it was done printing. Â The action to take is up to you, I’m using curl to load a python CGI on a server to send an email/SMS to my phone. If you want to watch your non-default printer – just use the -P flag to lpq.
#!/bin/bash
LPQSTAT=lpq | head -1 | awk '{ print $NF }'
while [ $LPQSTAT = 'printing' ];do
echo $LPQSTAT
sleep 5
LPQSTAT=lpq | head -1 | awk '{ print $NF }'
done
curl ....
exit 0
December 15th, 2008 — Technology
Here is a quick bash script to delete all ACLs from a file or folder:
#!/bin/bash
LINECT=`ls -ed "$1" | wc -l`
while [ $LINECT -gt 1 ]
do
chmod -a# 0 "${1}"
LINECT=`ls -ed "$1" | wc -l`
done
December 13th, 2008 — Random Observation
In times of plunging gas prices – it takes some real smarts and guts to remind people that the peak oil problem has not disappeared.
Some quick observations. Â It seems that CERA is always contacted for the “oil is not a problem” perspective. Â I don’t know why they get so much cred, when it has been shown they have been wrong in the past.
Also, interesting to note that the next generation of oil professionals is more in tune with peak oil as a reality.
Lastly – Simmons is one smart guy, Obama should invite him in for a private presentation.
December 5th, 2008 — Random Observation
I predict we will see people getting excited about projects like this. Â But I have to wonder if the scientists working on these have ever seen the fouled bottom or pier piling. Â What is the energy cost after you factor in maintenance?