Mostly work related stuff which I would've entered into my "Log book". Instead of hosting it on an intranet site, outsourcing the hosting to blogger!
Wednesday, December 29, 2010
printing to a receipt printer from OpenBravo POS
Edit: P adds:
Finally was able to get this work with correct font size.
Suggestion from this forum post.
Solution:
Epsons POS website had the latest virtual COM port software which works for Windows 7: TM Virtual Port Driver Ver.5.00aE . Assigned the printer to COM1 through the software and changed the openbravo pos settings to Printer: epson -> Serial -> COM1
Tuesday, December 28, 2010
set mime types in Plesk
radiosai.org -> Virtual Directories -> Mime types tab and added
asx - video/x-ms-asf
pls - audio/x-scpls
upgrading ActiveSync and more

Also, as this post points out, changed the Remote NDIS host setting on the mobile so that the "Unable to obtain IP address" error stops popping up.
Wednesday, December 08, 2010
gmail pop3 captcha
Did all that, but actual problem was a change in password from sssbpt.org. Fixed that, and everything started working again.
Tuesday, December 07, 2010
cyberoam failover tweak
Monday, December 06, 2010
upload through cyberoam - problem solved

That is, clear all the check-boxes in the last line in the image above.
Sunday, December 05, 2010
problems with kindle not connecting to wifi - solved with static ip address
K was initially turned off since a DNS server IP address is required. You can always give the google public dns ip address of 8.8.4.4 or 8.8.8.8 if your router itself does not do a good job of providing a stable dns server. OpenDNS is also available, 208.67.222.222 and 208.67.220.220
Thursday, December 02, 2010
uploads problems with Cyberoam
Wednesday, December 01, 2010
thumbnail images for saicast
Saved http://saicast.org/images/gangacanal.jpg on my system as saicast4x3.jpg
Opened it in Gimp and found the dimensions of the image alone excluding the frame to be 171 x 127
Then, opened the vimeo videos one by one, played them till a suitable frame, paused and hit printscreen, pasted into Gimp, cropped to a suitable 4x3 frame, resized to 171x127, pasted into the selection on saicast4x3.jpg and then exported as whatever.jpg.
Wednesday, November 24, 2010
live streaming with stock laptop

I rode the rec-level fader since Srv was monitoring before the compressor. Maybe next time a better choice of compressor settings can avoid my having to ride the faders. Anyway, output level was respectable, near -12 dB RMS, after the first few minutes when I was not riding the faders close enough and the compressor was not set on the output.
Saturday, November 20, 2010
direct download to kindle
Sunday, November 14, 2010
smtp timeout errors
Friday, November 12, 2010
qshape for checking postfix queue
Some results from 5 days back when the problem was first detected:
sudo qshape -s incoming active deferred
shows
T 5 10 20 40 80 160 320 640 1280 1280+Out of these mails, most of them were yahoo.
TOTAL 33626 0 0 0 0 0 0 0 4 9645 23977
radiosai.org 32886 0 0 0 0 0 0 0 4 9645 23237
sssbpt.org 740 0 0 0 0 0 0 0 0 0 740
sudo qshape incoming active deferred
T 5 10 20 40 80 160 320 640 1280 1280+
TOTAL 33623 0 0 0 0 0 0 0 4 9645 23974
yahoo.com 24602 0 0 0 0 0 0 0 3 6365 18234
yahoo.co.in 7809 0 0 0 0 0 0 0 1 2903 4905
airtelbroadband.in 154 0 0 0 0 0 0 0 0 30 124
yahoo.in 127 0 0 0 0 0 0 0 0 72 55
spml.co.in 82 0 0 0 0 0 0 0 0 20 62
lycos.com 67 0 0 0 0 0 0 0 0 13 54
.... snip .....
Wednesday, November 10, 2010
bug - some files not imported into database
importing files to downloads without playing them
2. Enter suitable date in /home/sgh/scripts/playlist_import_hardcoded_date.sh
3. Then we can run playlist_import_hardcoded_date.sh to get the csv to the radiosai.org database
4. Then go to http://localhost/mkcsv/csv.php?date=01&month=01&year=1985 (or whatever date) to upload csv
6. Then go to radiosai.org and import the csv of the correct date.
bounce processing for yahoo and new ip address
Contacted yahoo using their bulk mail contact form. Their reply said
After looking into the issue, it appears that your emails may have become de-prioritized due to a number of potential issues with your mailings. Please visit the following URL for information on improving list maintenance:The last point was about too many non-existent email addresses - and found lots of such errors in mail.log
http://help.yahoo.com/l/us/yahoo/mail/postmaster/errors/postmaster-23.html
http://help.yahoo.com/l/us/yahoo/mail/postmaster/basics/basics-55.html
http://help.yahoo.com/l/us/yahoo/mail/postmaster/errors/421-ts03.html
Digging deeper, this is what I replied to yahoo:
Going through your checklist, and checking out our bounce processing, found that the bounces from yahoo were not being processed! The reason being that yahoo mail servers don't send the bounce messages, our mailer daemon has to send the bounce message, and this was not being sent to user noreply - user did not exist! This meant that more than 100 - 200 bad yahoo accounts have been sent mail from our server for the past several months! We're weeding out the bad ids - done some manually, rest will be processed by the bounce processing mechanism of phplist over the next week.Actually there were around 400 bad mails of yahoo domains and a few from other domains. Unsubscribed the yahoo ones manually by digging through the bounces one by one using the gmail interface. The others will be caught by the bounce processing in due course.
For getting the bounces to the right place, I just had to create a noreply user, and put the following lines in a file /home/noreply/.procmailrc
MAILDIR=/var/spool/mail/noreply #The location of mail directory
:0
! our.bounces.email.id@gmail.com
After I sent the email to yahoo, they replied, saying in part,
Yahoo! Mail accepts a maximum of 20 messages per SMTP connection. We encourage you to cap the number of messages you send to Yahoo! Mail to fall within this per-connection limit.
My reply to that was:
We're running postfix > 2.3 which does not have a direct way to limit number of mails sent per connection.
http://www.postfix.org/CONNECTION_CACHE_README.html#limitations
Hopefully our server will reconnect OK with yahoo servers on dropping connections - our logs don't show any problems with that. We're still in the process of weeding out bad addresses. Once we finish that, hopefully, we won't irritate the yahoo MX servers as much!
In addition, I have now put
smtp_defer_if_no_mx_address_found = yes
in the /etc/postfix/main.cf - Default was to bounce mail if MX record not found, i.e. if DNS fails. Now changed to wait and retry for upto 5 days or whatever message age time is set.
Friday, November 05, 2010
download link from vimeo
http://www.vimeo.com/moogaloop/play/clip:${VIMEO_ID}/${REQUEST_SIGNATURE}/${REQUEST_SIGNATURE_EXPIRES}/?q=sd" > ${VIMEO_ID}.flv
where he gets REQUEST_SIGNATURE and REQUEST_SIGNATURE_EXPIRES from P made a very elegant PHP5 script based on
VIDEO_XML=`${GET_CMD} http://www.vimeo.com/moogaloop/load/clip:${VIMEO_ID}`
REQUEST_SIGNATURE=`echo $VIDEO_XML sed -e 's/^.*\([^<]*\)<.*$/\1/g'`
REQUEST_SIGNATURE_EXPIRES=`echo $VIDEO_XML sed -e 's/^.*\([^<]*\)<.*$/\1/g'`
$xml = simplexml_load_file("http://www.vimeo.com/moogaloop/load/clip:$id");
$request_signature = $xml->request_signature;
$request_signature_expires = $xml->request_signature_expires;
$downloadurl = "http://www.vimeo.com/moogaloop/play/clip:$id/$request_signature/$request_signature_expires/?q=sd";Unfortunately our server did not have PHP5, and PHP4.x did not have the simplexml functions. So I modified it to use curl using the code example from this page and using the value_in() example from this page.$xml = get_html("http://www.vimeo.com/moogaloop/load/clip:$id");
$request_signature = value_in("request_signature", $xml) ;
$request_signature_expires = value_in("request_signature_expires", $xml) ;
$downloadurl = "http://www.vimeo.com/moogaloop/play/clip:$id/$request_signature/$request_signature_expires/?q=sd";
echo "<p align = \"center\">";
echo "<a href=\"";
echo $downloadurl;
echo "\">Right-click here and choose 'Save Link As...' or 'Save Target As...'</a>";Attempls to avoid the 'right-click instruction' did not work, since the vimeo server sends the video as mp4 without a Content-Disposition attachment header, and redirects don't conserve headers. Finally, of course, the script was not used due to non-technical reasons....
Saturday, October 30, 2010
setting a web page to expire on IIS
Thursday, October 28, 2010
cyberoam configuration
Sat with P configuring the Cyberoam CR50i for quite a few hours - 1-4 on two afternoons and 8-11 last night.
Actually info on what we needed to do was there in the knowledge base, what we were doing wrong was
(a) using the hardware ports to create sources for port forwarding while creating virtual hosts, and
(b) not creating simple Accept firewall rules with the virtual hosts as the destination.
So, first go to Firewall -> Virtual Hosts and create as required:

Then the firewall rules to allow connections.

We had to make a similar rule for Wan also, of course.

One more thing which we needed to do was to disable the Web console of cyberoam from WAN. This was found in the User Manual, blandly located in Firewall -> Local ACL
