Wednesday, December 28, 2016

setting up SPF and DKIM with CPanel and WHM

CPanel and WHM make the process of setting up SPF and DKIM fairly straightforward.

To open the CPanel of a particular user from WHM, typing Account in the top left search box shows "List Accounts" - Home -> Account Information -> List Accounts. There, clicking on the CPanel icon opens up CPanel for that user account.

Within CPanel of the relevant domain, typing DKIM brings up the required link - Home -> Email -> Authentication

A single click on that page enables or disables DKIM and or SPF.

(Actually I had run the certificate creation etc using scripts under cpanel running as root user and so on, but most probably all that was not necessary.) 

Wednesday, December 14, 2016

problem with BuTT overwriting recordings

I had entered the wildcard for index as filename%n - but then BuTT was saving a file called filename%n.mp3 and was prompting to overwrite old recordings. 

The correct wildcard for index is %i - and for timestamp, it is %H%M%S - have now changed to %i as given at
http://butt.sourceforge.net/manual.html

Tuesday, December 13, 2016

raw 14-bit images with Canon 1100D

According to wikipedia, our Canon EOS 1100D camera is capable of saving to RAW 14 bit CR2 format!
To convert linearly,

http://www.mit.edu/~kimo/blog/linear.html
suggests dcraw with the following commandline - 

dcraw -v -4 -H 0 -W -w -q 3 file.nef

below is a command which can be saved as a batch file (filename.bat) which works on Windows XP for linear conversion to tiff, for all files in the folder. Tested working on Windows 8.1 also. 

for /r %%i in (*.CR2) do dcraw -v -4 -H 0 -W -w -q 3 -T %%~nxi

A similar shell script on Linux / Mac would have the following form, adapted from
http://www.tuxradar.com/answers/484

for f in ~/path/*.CR2
do
dcraw -v -4 -H 0 -W -w -q 3 -T "$f"
done  

The -T makes dcraw output a TIFF file instead of the default Portable Pixmap PPM file. 

Sunday, December 11, 2016

upgrade to live broadcast system

After five years, the live audio broadcast method at mandir has changed. There were a couple of unexplained random shutdowns of the Macbook Pro, so PB decided to upgrade hardware and software. Current setup uses physical cables instead of JackOSX, and upgraded versions of Reaper and BuTT on a Mac mini running Mac OS Yosemite. Compressor is also hardware - our trusty Behringer MDX2200. Settings were adjusted for fast attack and slow release (1.5 sec). Lots of gain to compensate the compression. Level set to +4dBu and not -10 dBV.


Sunday, November 13, 2016

Issues when using Google Docs fonts for Malayalam

When entering Malayalam text with Google docs, Firefox on Windows XP, one cannot choose the font - only one font seems to be available. This font also had issues like showing

instead of
and so on.

So, I used MS Word and the Rachana font instead, which looks good. But this has an issue - chillaksharams are automatically joined to the next letter whenever we save and re-open the document - like
മാര്‍ഗ്ഗത്തില്‍_ഗ്രഹങ്ങള്‍_സഞ്ചരിക്കുന്നതും becomes മാര്‍ഗ്ഗത്തില്‍ഗ്രഹങ്ങള്‍സഞ്ചരിക്കുന്നതും

My workaround was to add the character _ after each such letter, and finally, using the Find and Replace tool, change the font colour for this _ character to white, so that it is not visible.

This issue with web fonts seems to be well documented. Following the advice on the comments on that page, I installed Meera and other fonts given at https://smc.org.in/fonts/
After a restart, now I see പ്രകാശം - rendered as
Meera seems to have now become the default on Google Docs and Blogger on Firefox / Chrome, replacing the buggy Windows default Karthika. Now, probably, I can directly write with Google Docs instead. 

Friday, November 04, 2016

How to edit a Hindi document in Google Docs

Copy-pasting from an email sent to one of our collaborators:

I assume that you are using Google docs on a desktop computer. Then, when you click on the links I sent, Google Docs will open up. In the toolbar of google docs, please choose the "Select Input" button, which may be showing a Hindi A letter, as shown in the screenshot below.


Unless you know Hindi typing, the Devanagari phonetic option is the easiest to use. If you choose that option, if you type padaarth, it will give a list of options, and just pressing the spacebar will choose the topmost option, which would be पदार्थ
In case your window is too small, you may need to click twice in order to get to the Select Input button, as shown in the screenshot below - first click on More... and then on the Select Input button. 


Friday, October 28, 2016

Some speed tests and battery info

To add to my previous post on Jio 4G. The speed tests are taken at different times of the day, time can be seen at top right.

 











But the speed tests done with servers outside India shows that Jio's gateways are congested.
versus a server from the US,

The same test, when done with a BSNL broadband connection limited to 1 Mbps gave the following - 
and

And now a trend line showed by the battery app on the Intex Aqua, when left on as a wifi hotspot, wifi sharing enabled, but without much usage - 






Edit - One more post about Airtel speeds done on 4th Jan 2017. 




Saturday, October 15, 2016

Friday, October 14, 2016

USB tethering Android phone using Windows XP

During my Jio trials, I wanted to try both wifi tethering, which is easy but drinks battery, as well as USB tethering. On Windows 7, simply enabling USB tethering on the phone Settings -> More -> Tethering and wifi hotspot -> USB tethering was sufficient - the OS recognised the connection and got IP addresses by DHCP etc.

On one Windows XP machine, I found that the same procedure worked, with the phone being recognised as a Windows mobile internet sharing device, since I had earlier installed drivers for an old Windows mobile phone on this computer. Full USB2 speeds listed - "Connected at 475 Mbps". Actual download speed was about 3 Mbps when I tested on Jio.

On another Windows XP computer, the windows mobile driver had not been installed, and installing the inf file as given at
https://support.google.com/nexus/answer/2812516?hl=en
did not help. Windows did not recognise the driver as being suitable for this device.

Tried installing a driver from Intex, the manufacturer of the phone, from
http://www.intex.in/Resources/Index
but that also did not help. 

Thursday, October 13, 2016

Reliance Jio notes - pros and cons - mini review

Since my Xiaomi phone was showing some problems due to a crack on the screen and a dunking in water, I thought I would get a backup phone. And with 4G support in order to use the Reliance Jio welcome offer of free sim + free data + free calls upto 31 December. Got the cheapest 4G phone advertised with VoLTE - Intex Aqua 4G Strong.


Got a barcode by entering my Aadhaar number into the MyJio app, got a free SIM in ten minutes from a nearby shop, got thumb-print scanner verification done there itself. Though the dealer said the network would start working in another hour, it took another 6 hours or so, until at night the data connection on the SIM started working - activated.

Incoming and outgoing calls were not happening. Tried installing Jio4GVoice app to make outgoing calls over VoLTE - outgoing calls started going through. But not incoming calls. After 4-5 days, incoming calls from other Jio numbers started to work. Perhaps incoming calls from other networks would also work after a few more days. Solution suggested by Jio dealer was to install JioChat app - not sure how that would help. 

Battery life of this phone is not stellar, as the reviews suggest. But for Rs. 3500, no complaints in using this as a backup phone. Just on 4G standby, battery drains in 10 hours or so. Tethering via USB or wifi also drains battery quite fast, though USB tethering also charges the battery. 

As this indiatoday post indicates, there are many issues with Jio. The reliability issues are so much that anyone who needs a phone to work all the time must have another number from another provider. Interconnect issues apart, even Jio to Jio calls have problems due to people going offline - though this is probably due to their using other network options instead of Jio. Can use it as a free toy till Dec 31, that would be my policy.

Speeds - apparently Jiofi devices have greater speeds than sims put inside mobile phones. I generally get around 5 Mbps, with speeds dropping to 1 Mbps in the evenings. Early morning peak speed of 15 Mbps. Torrents are probably throttled - we got around 2 Mbps over a half hour test run. Also, the speeds are limited after 4 GB per day (as of now) as shown in the MyJio app below.



      

With Jiofi device, as tested by my colleague V, has gone upto 50 Mbps also,


In general, the DNS services on Jio are bad - changing to Google public DNS immediately improved browsing responsivity. Streaming videos are generally good - HD streaming on the JioTV app and on YouTube. On Vimeo, sometimes spotty, sometimes OK.

Edit: One week post-activation also no incoming calls. So, called up customer care at 199. Spent around 20 minutes on hold before a polite agent picked up. Apologetically gave me separate complaint numbers for voice and sms not being received, giving a 48 hour resolution time. Got a truncated sms from Jio tech support during the 48 hours. Finally, around 3 days later, incoming calls started working. 



Monday, October 10, 2016

email ids for a new domain

Similar to my earlier posts, copy-pasting from an email I sent:

Google Apps for domains (now called GSuite) no longer has the free option for new customers.
https://support.google.com/a/answer/2855120?hl=en
"As of December 6, 2012, Google stopped offering Free edition to new customers. If you already had the Free edition, you can continue using it for free"

 Microsoft Live email  has also stopped new registrations for free domain support -
http://www.zdnet.com/article/microsoft-ends-support-for-custom-domains-in-free-email-service/

Zoho offers free for upto 10 users only,
https://www.zoho.com/mail/help/email-hosting-with-zoho.html

There are many paid options, I could discuss them with you if you are interested. And for the extremely tech savvy, you can also run your own mail server. Initially when we started with our domain's emails, we used to forward the emails to gmail from our own mail server. But that is a lot of hassle.

If you want Google GSuite free, an option would be to get the educational version, which remains free. But that has terms and conditions.
https://support.google.com/a/answer/2856827?hl=en

Sunday, September 25, 2016

formatting bold lines in MS Word table

Needed a specifically formatted table with some bold lines and some lines without bold face. Did the bold lines as per
http://superuser.com/questions/276778/how-to-adjust-the-thickness-of-some-lines-in-a-word-table

That is,
"Under Table Tools/Design menu, go to Draw Borders and adjust the line values to your preference. Then click on Draw Table and a pencil icon will appear. Click on any line and voila! The line is now set to your liking."

Wednesday, September 21, 2016

speed comparison - Matlab vs C vs python vs perl

I had found C code to be around 150x faster than Matlab for my implementation of the Monte Carlo code in Matlab.

User time:        3 sec for the C program
elapsed_time =  453.2500 sec  for the Matlab program

This stackoverfloe discussion has some interesting points to make - use Matlab first to get correct results, then increase speed with C, beware of errors in C libraries.

These benchmarks show python to be 3x to 100x slower than C - so, translating from Matlab to python in search of speed gains may not make sense.

These benchmarks show perl having similar speeds as python for loops - so I needn't explore perl, either.

Friday, September 16, 2016

miui permissions

On the Xiaomi Mi3 phone which runs the MIUI skin for Android, the method for setting permissions for apps is slightly different from the method for stock Android phones. The method for MIUI is via the Security App on the home screen, Security -> Permissions -> Permissions -> (Choose the type of permission like Contacts etc) -> enable or disable per app.

This is for MIUI Global 7.5, running on Android 6.0.1

Sunday, July 17, 2016

Income tax e-filing with e-verification

In earlier posts, I had detailed the process for e-filing Income tax returns in India. This year, from Assessment Year 2016-17, the verification can also be done online, by logging onto Netbanking portal of a bank where my PAN number is associated with my account. So, no need to print and post the ITR-V form.


In HDFC bank's netbanking portal, the e-verification is currently available under Requests - Income Tax E-filing on the left-hand side.

Around a month after I submitted the return in June, my tax refund has been credited, too.

Sunday, July 10, 2016

checking for bad blocks on hard disk

The IBM ThinkCentre given by K for use by Ke's son had some disk issues - the hard disk was my former 160 GB laptop hard disk. Probably bad sectors and so on, so I had to do the Linux equivalent of running scandisk. Ubuntu 16.04 apparently doesn't support shutdown -Fr now for scanning on reboot - maybe due to systemd?

So, booted using USB flash drive and ran
sudo umount /dev/sda1
sudo e2fsck -c /dev/sda1

Apparently e2fsck with the -c option marks bad blocks using the badblocks program. 160 GB drive took 1 hour 30 minutes to scan - would have taken around 45 minutes if not for the 97 errors.

Output of badblocks 97/0/0 apparently means  read/write/corruption errors. Since I'm doing a read-only test, only the read errors show up.

Sunday, July 03, 2016

browsing Windows shares with Master Browser down

The Studio network's master browser was set as the local server, which now has smbd service stopped. So, smb4k, konqueror etc were not displaying shares when queried with smb hostnames like smb://hostname
- ip addresses were required.

In order to query the ip addresses, google led to this post, so a listing, albeit clunky, is obtained with
nmblookup -S WORKGROUP
where WORKGROUP should be replaced with the name of the workgroup in the network. smb4k lists the workgroup names, so that can be a first step.

Edit: PB adds a better way:
nbtscan -qe 192.168.127.0/24

Thursday, June 23, 2016

converting putty key to open ssh keys

Used the method given here to convert, using
puttygen mykeyfile.ppk -o ~/.ssh/id_rsa.pub -O public-openssh
and
puttygen mykeyfile.ppk -o ~/.ssh/id_rsa -O private-openssh

After moving the keys to .ssh, we also have to chmod 600 or else ssh will not take these keys by default. We also need to name them id_rsa and id_rsa.pub for ssh to use them by default, without having to specify ssh -i keyname username@server.

fixing dual-boot time differences

With earlier versions of Linux, the method was to choose UTC = yes in /etc/default/rc5 and so on. With Ubuntu 16.04 and above which use systemd, the method is to enter
timedatectl set-local-rtc 1

Monday, June 20, 2016

behaviour of virtualdub frame processing

If we choose Process every other frame (decimate by 2) - the resulting avi would have a framerate half that of the source.

For example, a 30fps source, with this decimate by 2 results in an output at 15 fps. If that 15 fps output is re-saved using direct stream copy choosing 30 fps as output frame rate, then we get a 2x speeded up video. A two-step process.

In order to get 2x speeded up video in one step, choose to Change frame rate to 60 fps, and then Convert to 30 fps.



Tuesday, June 14, 2016

cloning laptop hard disk

My laptop hard disk started showing SMART errors with Crystal Disk Info. Got a new Seagate 1 TB SSHD for replacement. Macrium Reflect Free could not clone - the bad sectors made it abort. Clonezilla did the job in around 4 hours for the 160 GB hard disk with three partitions, using an external USB dock for the new hard disk.

But the cloned hard disk did not boot. Booted with Windows XP install DVD, went into recovery console and did fixmbr. Then XP booted, but showed only C and D drives. Since in any case I would need to copy files from E:, might as well increase the size of C: by deleting D:. Used Partition Wizard for increasing C: size, created D: and E: as fresh partitions, and left free space for Linux. RichCopy copied over the D: and E: contents, ignoring errors, in just about 90 minutes. Now most apps work as expected, except some which complain about path not found - maybe they look for My Documents in C:.

Later, installed Kubuntu 16.04 on a trial basis, using mini.iso and a network install - the process took around 90 minutes.

Tuesday, June 07, 2016

checksums on Windows

As mentioned on this page, installed and tried out WinMD5Sum and Checksums calculator. Found that one of my iso downloads had a checksum error.

Wednesday, June 01, 2016

WHM + CPanel setting up ssh access

To set up shell access via ssh to a server for which I have Web Host Manager (WHM) and CPanel access:

1. Import my existing ssh public key to the server via the CPanel of the relevant user - by clicking Manage SSH keys - for this, as this post mentions, the key should be prefaced with ssh-rsa and should not have line breaks within the key.
2. The key should be authorized - from the Manage SSH keys interface, by clicking on the Manage authorization link. Now ssh login via key exchange using that key would be possible, for that user.
3. In order to get to a root shell, that user has to be added to the wheel group, after making sure that user is in a full shell and not a jailed shell - via WHM in Home >> Account Functions >> Manage Shell Access and Home >> Security Center >> Manage Wheel Group Users respectively.

Sunday, May 08, 2016

problems with X crashes on newer Ubuntu

My Ubuntu install has had problems with random freezes after an upgrade to 12.04. Finally, when starting to do some serious simulation work, I decided to do something about it.

The first thought was that firefox was causing the crashes, since the freezes would start most often while starting firefox. But then, found the crashes happening when starting other apps as well. Suspected X, or the display driver, and wanted to use vesa instead. Many of the methods listed, like blacklisting nouveau, did not work with 16.04  - even after reboots, nouveau driver was being listed as used by lsmod.

Final solution was to create a /etc/X11/xorg.conf - which does not exist by default. As mentioned at many places, the procedure to do this was:
Switch to a console. Ctrl+Shift+F2, for example.
Kill the display manager with sudo service lightdm stop (or whichever dm is running)
Generate a new xorg.conf with sudo X -configure
Edit the xorg.conf.new created in current directory, replacing all instances of nouveau with vesa
Move it with a rename to /etc/X11 with sudo mv xorg.conf.new /etc/X11/xorg.conf
Restart X with sudo service lightdm start

Unfortunately with Vesa, the screen refreshes are very laggy, even with Lubuntu. But no crashes. 

Saturday, May 07, 2016

Thursday, May 05, 2016

python using a single core for numpy

A point which came up when using pynlo:

A longish reply for the question why python uses only one core for numpy -
http://stackoverflow.com/questions/15639779/why-does-multiprocessing-use-only-a-single-core-after-i-import-numpy

In short, core affinity can be reset using
os.system("taskset -p 0xff %d" % os.getpid())
after the module imports. But this would be useful only for multi-threaded programs, of course. 

Wednesday, May 04, 2016

mounting a samba share with read-write permissions

Mounting a shared network drive on our internal server running Ubuntu - to make it read and write enabled, PB reports the command to be:
sudo mount –t cifs //ip-address/Share_name /local/mount/path –o username=correct_uname,uid=local_uid,gid=local_uid

Then, the local_uid user has read + write permissions.

Edit: 11 July 2016

This post about listing hostname with ip address is useful.

Also, PB adds one more tip - for mounting shares with spaces, use single quotes
sudo mount -t cifs '//192.168.1.1/SHARE WITH SPACES' tempmount  -o username=guest,password='',nounix,sec=ntlmssp

Tuesday, May 03, 2016

installing and using pynlo

Looking around for supercontinuum generation literature, came across PyNLO's documentation. Tried to install and use it. Was a bit of a struggle at first, but finally it all came together.

Issues:

  1. Anaconda3 version 4.0 installation on Windows XP failed - reported that it failed to change path variable etc, but more importantly, the exes were not running - "this is not a valid Windows executable".
  2. On Ubuntu 14.04, tried a direct pip install. Some dependency issues. Thought upgrading to 16.04 would help - ran out of hard disk space - 13 GB. Formatted and installed Lubuntu instead. With many hiccups on the way - like while doing a manual partitioning, we must not touch the swap space - because that is where the installer stores the installation files!
  3. With Anaconda3 and pynlo, errors like Missing parenthesis in call to print - so had to install Anaconda2 instead.
  4. Trying installation with pip install pynlo - installation of the required pyfftw failed with the error  fftw3.h: No such file or directory - it needed libfftw2-dev as mentioned in the comments at this post
  5. After pynlo installed also, running the example script gave errors IOError: [Errno 2] No such file or directory: .../pynlo/media/fibers/nist_fibers.txt and on copy-pasting general_fibers.txt to nist_fibers.txt, an assertion error - pynlo/interactions/FourWaveMixing/SSFM.py, line 662, in conditional_fftshift assert chksum == np.sum(abs(x)) AssertionError
Solutions:
  1. Currently pynlo needs Python 2.7 to run, won't run on Python3. So, install Anaconda2 and not Anaconda3. 
  2. On Windows, this page says that Windows XP is supported only for Anaconda versions 2.2 and below, so downloaded 2.2 instead of the latest.  
  3. Installing libfftw2-dev on Linux with apt-get install libfftw2-dev solved the pyfftw install issues. Similarly, on Windows, the way to install it is given at https://pypi.python.org/pypi/pyFFTW#downloads - ie. download the fftw dlls and put them in the same folder as the pyfftw wheel folder before install. The pyfftw whl file was installed as pip install wheelfile.whl without any issues. 
  4. Using the latest git code solved all the pynlo issues, using
    pip install git+https://github.com/pyNLO/PyNLO.git like this post
  5. Git for windows was installed from https://git-scm.com/download/win
  6. On Windows XP, everything was 32 bit, and the example took 55 seconds to run. On 64-bit Lubuntu, it ran in almost the same time. Lubuntu's desktop CPU meter indicates that it was using only one core of my dual-core Athlon, ie. 50% cpu.   

freeing up space on ubuntu

This post has lots of useful information in the answers. I removed libre-office and old kernels to get 1.5 GB. For the removing the old kernels, I followed
1. uname -r to know current kernel
2. sudo apt-get remove kernelname1 kernelname2 etc after doing
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove
sudo apt-get install localpurge
and
rm -Rf /tmp
etc.

The listing of all packages with sizes with
dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -nr | less
is also a nice trick to use. 

Monday, April 25, 2016

too many files bug and php error reporting

Our audio search page had a bug where if too many files were selected, the results would not be displayed. With the help of S & B, constructed a workaround. The form was submitting all fields of the large table, instead of only submitting the hidden variables which had the fileids. So, made the main form submit to a dummy destination, and made another form with the hidden variable, submitting to the actual destination. That solved the issue, which was that there were too many fields being submitted. We did not have to change max_input_vars.

While troubleshooting, we wished to see detailed error reports. The way to do that was
ini_set('display_errors',1);
error_reporting(E_ALL);

for each php page.

Wednesday, April 06, 2016

cyberoam fail-over issue

PB had a problem where the 2nd gateway was not being automatically used as failover when the main gateway failed. Apparently it was due to the way in which Cyberoam had been configured. Tech support explained it, and PB fixed it. 

Tuesday, March 29, 2016

Xmms alternative

P reports that Xmms is no longer available on Ubuntu 14.04, and some of the ubuntu forum posts have broken links. His solution was to recompile and use Audacious instead. 

dns limitations on our mail server

We were doing some explorations of the feasibility of remote hosting our mail server which sends out daily emails to around 50,000+ subscribers. Seeing some posts about rate limits to Google public DNS servers etc, and our own experiences with DNS failures, we should perhaps run our own DNS server as well as mail server if we plan to shift the email server. 

Sunday, March 27, 2016

Firefox problems with HTML5, Vimeo and Youtube

One issue seen with Firefox - Vimeo embedded player not appearing on screen - seems to have been sorted out at some time - the current version 45.0.1 does not seem to have this issue. Or is it that it still has issues with embeds like iframe src="//player.vimeo.com/video/xxxx instead of src="https://player.vimeo.com/video etc ? There are lots of people with issues with Firefox and Vimeo.
http://techawakening.org/vimeo-videos-not-working-in-firefox-solution/2490/

Then there is the persistent stutter - for audio as well as video using html5 playback from Firefox on Windows. The only solution for that seems to be to force Flash player playback. This can be done for youtube as in my earlier post.



problem reading memo field

After a PHP upgrade from 5.3 to 5.5, one of our php applications reading data from an Access .mdb file had an issue - other fields were displaying fine, but the data from the memo field was showing blank.

After poking around for a couple of days, PB finally found the solution to be the one suggested in the comments at
https://bugs.php.net/bug.php?id=52658

That is, he had to add the optional cursor_type parameter SQL_CUR_USE_ODBC like
$cnx = odbc_connect('$databaseName', 'user', 'pass', SQL_CUR_USE_ODBC);

 Then it works. 

Tuesday, March 22, 2016

Airdroid vs ES File Explorer

One more post about my Xiaomi Mi3 phone. Though this is probably applicable to all Android phones.

I'd earlier used ES File Explorer to transfer files to and from Windows shares to the phone over Wifi. But when transferring to shares with a large number of files, or while transferring large files, ES File Explorer would keep popping up a 'Failed' dialog box, and would need repeated 'Retry' attempts to transfer multi-MB files. Finally looked for alternatives, and found Airdroid's features include file transfer. I use it in 'local network' mode, by typing in the ip address, so extra charges, no need of external network etc. ES is still useful for local file browsing etc.

Xiaomi Mi3 with Android 4.4.4 - soft home and back buttons

After my last post about my phone, there were some more developments. Now the headphone socket does not work at all. But thankfully the earpiece works fine. Then, after frequent falls onto hard cement floors, the left corner of the screen cracked slightly, and the home, back and recent apps buttons on the bottom bezel of the phone stopped working.

Since I had heard of apps with 'soft home button', I installed several of them. None of them seemed to work with Xiaomi's MIUI. Then I installed MyHomeButton which creates a notification in the notification pull-down screen. This worked, but with the drawbacks that:
  1. It would not start on rebooting the phone - I have to remember to open the app settings, turn off and turn on the check-boxes for Home and Recent Apps, then the notifications would appear. 
  2. No back button.
  3. Use requires a swipe from the top to bring down the notification bar, a swipe sideways to view the notifications, and then a tap to activate the home button. A bit cumbersome.
I lived with the above drawbacks till today, when I installed Back Button Gesture Launcher. Or rather, the trial for the paid app. Since it is a paid app, it had a somewhat helpful 'Help' section, which mentioned that for the onscreen button to be visible, what settings need to be enabled on Xiaomi -
  1. Settings -> Installed Apps -> Downloaded -> Back button -> Permission Manager -> Display pop-up window, Enable. 
  2. Settings -> Additional Settings -> Accessibility -> Back button -> Accessibility, Enable. 
Now, this app is a paid app, and one of the comments directs users to install the Back Button app instead, which is a free app. So I did that, after uninstalling Back Button Gesture Launcher. Granted the permissions again, and ready to go. A small issue with this app is that the icons don't seem to be movable from their location on the right side of the screen. But that is probably not a big issue.


Tuesday, March 08, 2016

funny characters seen in Putty session

After a server upgrade (I think), I started seeing funny characters when using Putty to ssh into our local server, like

P suggested this might be the solution,

That is, change character translation in Putty to UTF-8. The setting is in Window -> Translation. Worked.




Sunday, February 14, 2016

smooth plot in Matlab

This post has some useful techniques for using in Matlab, for smoothing data using
http://stackoverflow.com/questions/12987905/how-to-make-a-curve-smoothing-in-matlab

If curve-fitting toolbox is present, smooth can be used. Or we can roll our own, as mentioned in the link.

Saturday, February 13, 2016

video stabilization plugin for virtualdub

Video stabilization used to be available only in high-end video editing software. Realized now that Virtualdub has a plugin, too! And its development dates back to  2003. Used the Deshaker plugin from
http://www.guthspot.se/video/deshaker.htm
for a video of an oscilloscope trace, pretty good!

Friday, February 12, 2016

multiple issues with sending bulk email

SSSIHL tied up with Benchmark for sending some 4000 emails, they wanted to make it into a newsletter every couple of months. There were multiple issues with the email sending.

  1. The first time around, the sssihl.edu.in SPF record had not been updated to include benchmark servers, which resulted in spam filtering blocks for most of the mails. Along with SPF update, Benchmark also recommended whitelisting the Benchmark mail server IPs for sssihl.edu.in mail servers. 
  2. Found that Google Apps allows whitelisting. Updated the SPF record.
  3. Then found that the SPF record was returning an error, too many lookups, via the test at  http://www.kitterman.com/spf/validate.html - googling showed that having Godaddy's  include:smtp.secureserver.net in the SPF record causes a very large number of lookups. Moved the sending of emails from the Godaddy server to google apps, removed that include, then the SPF validated. 
Finally most of the emails went through after the valid SPF. 

cleaning up C drive

All these years, I had relied on various tips and tricks for cleaning up C drive on Windows, and had never used the Properties -> General tab -> Disk Cleanup utility's "Compress old files" feature, because it used to take a long time to run. But yesterday I did, and it made 9 GB available on a drive which had only 600 MB free!

Add 2 GB to Google drive storage

K sent me an email telling me about "an annual ritual by Google. I did it last year too and got 2GB."

Do the security checkup and get 2GB added:
http://www.theverge.com/2016/2/9/10940046/google-drive-free-2gb-space-security-checkup

http://googledrive.blogspot.com/2016/02/safer-internet-day-2016.html

Have now added a google calendar reminder for this :)

Tuesday, February 09, 2016

Apache 403 Forbidden errors

P had a problem after he migrated data from an old hard disk to a new hard disk on our internal server. A couple of folders in the hard disk were supposed to be available via the local webserver - but after the migration, those were returning 403.

Finally, the issue turned out to be permissions for the parent directory. Gave the permissions, also had to add Indexes to the Options line in apache2.conf for one of the folders, all done.

https://wiki.apache.org/httpd/13PermissionDenied

Sunday, February 07, 2016

retuning tv set-top box

Doordarshan DTH, now called FreeDish, migrated from INSAT-4B to GSAT-15. P sir and R called me for re-tuning their set-top box. Since the satellites are nearby, there was no need to re-align the antenna.

R had managed to enter the correct values of frequency, polarization and symbol rate in TP edit mode. It only needed a scan of the correctly entered transponder values. The relevant menu item was in the Installation menu, Scan current ANT.

Saturday, January 30, 2016

SGH database update for MBV files

Guest post from PB.

After the local server hdd crash in Nov 2015
​,​
 we had lost the sghtelugu file_id records. On re-importing the files into the database, I missed out the info that the mbv files had a different download filename
.

Due to this sghtelugu database and sgh database had different download filenames causing end
​-user download issues.

Did the following.
​...​


1. Tried to create a soft link in dl.radiosai.org expecting that http download link would automatically get redirected to the  softlink. But this did not work. It downloaded the file without the modification.

2. The only way is to update the records 
​both sghtelugu and the schedule page database (radiosai)

a. Created a SQL query that would give me the update SQL statements :

psql -d internal_db -A -F ',' -t  -c "SELECT 'UPDATE our_primary_key SET download_filename = \'' || download_filename || '\' WHERE filename = \'' || filename ||'\';' FROM our_primary_key WHERE filename <> download_filename AND filename ILIKE '%mbv%' " -o /home/sgh/update.sql

​This sql statement searches for all the MBV files where the filename is not matching the download filename in our internal database and forms a update sql list. 


UPDATE file_id SET download_filename = 'MBV_2003_08_MODIFIED.mp3' WHERE filename = 'MBV_2003_08_UNMODIFIED.mp3';
UPDATE file_id SET download_filename = .... etc 

about 1358 records

b. Executed this set of update queries on sghtelugu database. This step cleans up the local sghtelugu database

c.​
​ Then modified the update.sql file by using find-replace the database table name and column names like

UPDATE web_db_table_name SET dfileName = 'MBV_04_MODIFIED.mp3' WHERE fileName = 'MBV_04_UNMODIFIED.mp3';
etc

d. Logged into our website Plesk and then to phpMyAdmin database and executed the modified update queries.

Friday, January 15, 2016

Shoutstats update

After our internal server upgrade, Shoutstats stopped working. P did some digging and found that not only were rrdtool and php5-rrd not installed, but with the later versions of PHP, the short tags

Monday, January 11, 2016

quick review of Netflix India

A very quick review of Netflix's India offering, comparing it with the choices for Netflix streaming in the USA.

  1. The selections are very different, of course. For example, the Indian selection does not have "Who framed Roger Rabbit", many of the genres in http://ogres-crypt.com/public/NetFlix-Streaming-Genres.html are just missing in the Indian version. (link removed when Blogger unpublished this post)
  2. There are around fifty Indian movies (only) - youtube's selection is much wider for Hindi movies.
  3. Ditto for documentaries, eg. BBC documentaries. 
  4. If you want to switch countries using a VPN like PureVPN, you can't use Firefox's Private Mode - Netflix doesn't work well with Private Mode. (link to quora page removed when Blogger unpublished this post - https://www.quora.com/Why-doesnt-Netflix-allow-you-to-watch-movies-with-Chromes-incognito-mode ) You have to clear the website preferences using History -> Clear Recent History -> Time Range to Clear -> Everything -> Details -> Cookies, Cache and Site preferences (for Firefox). 
Edit: 15 Jan.
As of now, if you connect to a US VPN, you can access all the US titles even if your Netflix account is from India. 

This page (link removed when Blogger unpublished this post - http://www.finder.com/in/netflix-india-vs-netflix-us-titles-list ) has a comparison of titles available in India vs US - two and a half pages of titles available in India, eighteen pages of titles available in USA with maybe a page or so available in India but not available in the USA. 

Edit: 7th Nov 2022 - Blogger unpublished this post saying it violates community guidelines. Removing links and asking for a review. In what way does this violate community guidelines, I wonder.  

Wednesday, January 06, 2016

Chrome not loading https pages

Related to my earlier post, I found that Chrome on XP was not loading the https pages. Apparently this is related to XP reaching end of life and not supporting the latest ECC in https, as mentioned in the last post at the page
https://code.google.com/p/chromium/issues/detail?id=451311

So, for loading the https pages with this issue on Windows XP, the workaround is to use the latest Firefox.

CSS loading issue

A Tomcat page, loading from port 8443 using https, had the issue that the first time it loads, all formatting was lost - CSS was not loaded. A page refresh would load the CSS.

My diagnosis was that the relative url to the CSS was being interpreted by the browser as a call to http and not https:8443, and was failing the first time. This turned out to be correct, since giving the full path to the CSS file, like
href=https://servername.com:8443/path/to/file.css
instead of
href=../file.css
(with quotes for the links, of course) solved the problem.