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!
Tuesday, February 22, 2011
sql injection
Tried out HackBar for firefox to check for SQL injection on our sites. Basically followed this article's walkthrough. Lots of useful links at this stackoverflow post, in the comments. Especially the Oracle tutorial.
Sunday, February 20, 2011
Reviving a Transcend 256 MB pen drive
S wanted me to try and revive a 256 MB Transcend USB flash memory pen-drive. Plugging into an Ubuntu machine and checking fdisk -l showed it was formatted as FAT16. Probably there was also some corruption since he reported pulling it out while Puppy was formatting and/or partitioning it! Anyway, a quick mkfs -t vfat /dev/sdc1 did the trick, working fine now.
Friday, February 11, 2011
adding a mail relay
Re-created a virtual mail server relaying mail to alias addresses on our current server just like in my previous posts
http://hnsws.blogspot.com/2006/03/finishing-postfix-configuration.html
http://hnsws.blogspot.com/2006/03/using-krishna-to-forward-mails-to.html
Just had to do postmap /etc/postfix/virtual after the cf file etc update. This new machine did not start refusing emails for krishna.radiosai.org after adding the virtual domain. Added appropriate firewall rules to the gateway, of course. Just a note: in /etc/postfix/main.cf,
mynetworks = 127.0.0.0/8
does not need to be changed. Changing this is only required if you want the postfix to relay mail (without auth, for third-party domains - an open relay!) from some other ip address also.
http://hnsws.blogspot.com/2006/03/finishing-postfix-configuration.html
http://hnsws.blogspot.com/2006/03/using-krishna-to-forward-mails-to.html
Just had to do postmap /etc/postfix/virtual after the cf file etc update. This new machine did not start refusing emails for krishna.radiosai.org after adding the virtual domain. Added appropriate firewall rules to the gateway, of course. Just a note: in /etc/postfix/main.cf,
mynetworks = 127.0.0.0/8
does not need to be changed. Changing this is only required if you want the postfix to relay mail (without auth, for third-party domains - an open relay!) from some other ip address also.
Saturday, February 05, 2011
winamp not playing wav files - resolved
For many months, my WinAmp installation was not playing wav files, but was playing mp3 files. Today I finally worked out that the in_wave.dll was missing. And the reason was given in this post - I had installed Winamp Lite at one point of time, and that does not have wav support. Installed WinAmp full now - Lite is no longer available - and now it plays wav files without problems.
Friday, February 04, 2011
problems with Nokia Internet Radio on E63
B had a problem with his Nokia E63 phone not allowing him to open the Internet radio app, and giving
playinit error =-5
on trying to play with s60 internet radio app which was installed later. Googling found that this was most probably due to a failed update. Suggested solution seems to be to hard-reset the phone.
playinit error =-5
on trying to play with s60 internet radio app which was installed later. Googling found that this was most probably due to a failed update. Suggested solution seems to be to hard-reset the phone.
Thursday, February 03, 2011
playlist in The KMplayer
Making a playlist in The KMplayer might be the solution to my issue of playing PAL clip followed by NTSC (or 30 fps HD) clip. To make KMplayer play the next file in the playlist automatically, I had to go into
Options -> Preferences -> General -> Repeat / Playlist -> Choose Play Next Album
under "When Finished (Album has been fully played)..."
Wednesday, February 02, 2011
niggling bugs with Kubuntu
Had installed Kubuntu Ubuntu 10.04.2 LTS as the dual boot on my work machine after the earlier install stopped booting. (Most probably that was due to the mbr file being deleted from c:, or becoming corrupted.) This installation also runs from a loopback device, a file on the Windows filesystem, like my earlier install.
Anyway, came across some niggling bugs. One persistent one was the error message E:Unable to correct problems, you have held broken packages.

This would pop up every time I clicked OK for Amarok to install "extra multimedia functionality" as this dialog box says.

Doing a mouse-over reveals the correct package name. Installing everything else worked fine except for Flash. The package was flashplugin-installer
Googling found this thread, and as suggested, doing
sudo apt-get update
sudo apt-get install flashplugin-installer
seems to have done the trick.
Anyway, came across some niggling bugs. One persistent one was the error message E:Unable to correct problems, you have held broken packages.

This would pop up every time I clicked OK for Amarok to install "extra multimedia functionality" as this dialog box says.

Doing a mouse-over reveals the correct package name. Installing everything else worked fine except for Flash. The package was flashplugin-installer
Googling found this thread, and as suggested, doing
sudo apt-get update
sudo apt-get install flashplugin-installer
seems to have done the trick.
Monday, January 31, 2011
Testing our page loads and optimizing
K pointed out some excellent page-load speed resources for testing and optimizing:
http://googlepagespeed.com/
http://code.google.com/speed/page-speed/
http://modpagespeed.com/
And for testing, http://www.webpagetest.org/
As suggested by webpagetest.org , I have enabled compression on media.radiosai.org as given in this article: basically
cd c:\InetPub\AdminScripts
cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression true
cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcFileExtensions "txt" "htm" "html" "js"
cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcFileExtensions "txt" "htm" "html" "js"
cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcDynamicCompressionLevel 7
cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcDynamicCompressionLevel 7
cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcOnDemandCompLevel 7
cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcOnDemandCompLevel 7
I have not enabled the compression for aspx and other dynamic files, I have not disabled for HTTP 1.0 or proxies as given in the last two lines: will do that if problems arise.
Also set in content expiration as 1 day from the IIS Manager. http://www.radiosai.org/ had some difficulty in setting compression, since it is a shared environment under Plesk. Did contact nettigritty team about it anyway.
http://googlepagespeed.com/
http://code.google.com/speed/page-speed/
http://modpagespeed.com/
And for testing, http://www.webpagetest.org/
As suggested by webpagetest.org , I have enabled compression on media.radiosai.org as given in this article: basically
cd c:\InetPub\AdminScripts
cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression true
cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcFileExtensions "txt" "htm" "html" "js"
cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcFileExtensions "txt" "htm" "html" "js"
cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcDynamicCompressionLevel 7
cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcDynamicCompressionLevel 7
cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcOnDemandCompLevel 7
cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcOnDemandCompLevel 7
I have not enabled the compression for aspx and other dynamic files, I have not disabled for HTTP 1.0 or proxies as given in the last two lines: will do that if problems arise.
Also set in content expiration as 1 day from the IIS Manager. http://www.radiosai.org/ had some difficulty in setting compression, since it is a shared environment under Plesk. Did contact nettigritty team about it anyway.
Thursday, January 27, 2011
ssh-add required for Ubuntu 8.04 after ssh-keygen
On the Macbuntu running Ubuntu 8.04, when I attempted to use ssh with RSA key-based authentication like in my old post, ssh returned an error
Agent admitted failure to sign using the key.
Permission denied (publickey).
Googling found this as the first match.
Verified that running
SSH_AUTH_SOCK=0 ssh myuser@myhost
works fine with key-based auth.
Then ran ssh-add as suggested in that thread. From then on, ssh works fine.
Agent admitted failure to sign using the key.
Permission denied (publickey).
Googling found this as the first match.
Verified that running
SSH_AUTH_SOCK=0 ssh myuser@myhost
works fine with key-based auth.
Then ran ssh-add as suggested in that thread. From then on, ssh works fine.
Wednesday, January 26, 2011
keeping Windows and Linux dual-boot times correct
In this old post I had mentioned how to do it with Mandrake 10. In Kubuntu 10, the file to be edited, as per this forum post, is /etc/default/rcS
and by default it is already set to UTC=no
and by default it is already set to UTC=no
Saturday, January 15, 2011
downmixing to stereo
According to these posts on Hydrogenaudio forums, for downmixing 5.1 to stereo I should go with either
Lo = 1.0 * L + 0.7071 * C + 1.0 * Ls;
Ro = 1.0 * R + 0.7071 * C + 1.0 * Rs;
or
Lo = 1.0 * L + 0.5 * C + 1.0 * Ls;
Ro = 1.0 * R + 0.5 * C + 1.0 * Rs;
But I suppose in my case the C will have to be more since I want the commentary to be a bit louder.
Lo = 1.0 * L + 0.7071 * C + 1.0 * Ls;
Ro = 1.0 * R + 0.7071 * C + 1.0 * Rs;
or
Lo = 1.0 * L + 0.5 * C + 1.0 * Ls;
Ro = 1.0 * R + 0.5 * C + 1.0 * Rs;
But I suppose in my case the C will have to be more since I want the commentary to be a bit louder.
Tuesday, January 11, 2011
direct links to listen to specific radio programs
Explored ways to give direct links to radio programs like the hidden form + javascript like the technique mentioned at this stackoverflow form post. Basically of the type

but all in one line. Tried making a tinyurl link out of the javascript. It works with preview.tinyurl.com, but not with the direct tinyurl link. Other url shorteners like bit.ly did not work with javascript at all. So finally decided on html forms with javascript to auto-submit.

but all in one line. Tried making a tinyurl link out of the javascript. It works with preview.tinyurl.com, but not with the direct tinyurl link. Other url shorteners like bit.ly did not work with javascript at all. So finally decided on html forms with javascript to auto-submit.
Tuesday, January 04, 2011
updates on twitter
Started populating the twitter feed by 31 Dec using FutureTweets.com so that a twitter update box could be added to the schedule page by 2 Jan. Maybe it will be added to the home page later. Takes around 10 minutes a day or less to update. The thing to get the hang of is: which timezone to report in the tweet. For AsiaStream programs, IST is the easy choice. Other programs need some thinking.
Earlier, I'd envisaged making some sort of automated twitter posting with code similar to this blog post using php - but the coding is pending with P, and for me spending 5 minutes daily tweeting is easier.
Earlier, I'd envisaged making some sort of automated twitter posting with code similar to this blog post using php - but the coding is pending with P, and for me spending 5 minutes daily tweeting is easier.
Wednesday, December 29, 2010
printing to a receipt printer from OpenBravo POS
P had installed a new POS system on a Win7 Lenovo netbook and was having trouble printing to the USB receipt printer. It was printing, but leaving a lot of blank space at the top before printing and cutting the receipt. Finally fixed it by going to the printer properties, and in the paper settings, choosing 'Conserve paper' 'Top and Bottom'. The font is also different from the one seen in his other POS, which runs Linux. Probably because the Linux machine is printing to a driver similar to Generic Text. Trying Generic Text driver on the Win7 box gave the "correct" font, but the layout was awry. Probably an issue with paper settings for that driver, too. Anyway, since the smaller font is OK, he'll probably go with the Epson driver.
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
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
Noticed that after the server migration, the pls and asx files were no longer being served from www.radiosai.org - so went into the Plesk control panel,
radiosai.org -> Virtual Directories -> Mime types tab and added
asx - video/x-ms-asf
pls - audio/x-scpls
radiosai.org -> Virtual Directories -> Mime types tab and added
asx - video/x-ms-asf
pls - audio/x-scpls
upgrading ActiveSync and more
A brought a Toshiba Portege for me/A. When I attempted to sync it, it wanted me to upgrade to ActiveSync 4.5 from 4.2. After doing that, syncing from the old phone no longer does Contacts Sync - it says install Outlook for that functionality. So, for now, using ActiveSync merely as a connection mechanism to manually transfer files. Initially internet connectivity using ActiveSync did not work. Then changed the Connection settings on the desktop, "This computer is connected to:", changing the dropdown to The Internet

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.

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
Found an issue with pop3 not working on our automated bounce processing - fetchmail could not fetch mail from gmail and gapps accounts. At first I thought it was the problem with the issue reported here, and that I had to go to http://www.google.com/accounts/DisplayUnlockCaptcha
Did all that, but actual problem was a change in password from sssbpt.org. Fixed that, and everything started working again.
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
By default, cyberoam failover rules checks pings to the default gateway and fails-over if the pings fail. But in our case, the default gateway itself is ususally fine, it is the link to Bangalore which fails. So, it needs to ping the Bangalore end of the link and if that fails, failover. Changed the rule accordingly in cyberoam, works well now.
Monday, December 06, 2010
upload through cyberoam - problem solved
In a previous post, I'd mentioned that the Studio people have problems uploading stuff - ftp / yousendit / vimeo et al. Found a workaround - disable virus / spam scanning in the firewall rules. You can, of course, do this for only the particular host you are uploading from.

That is, clear all the check-boxes in the last line in the image above.

That is, clear all the check-boxes in the last line in the image above.
Subscribe to:
Posts (Atom)