- Impressive - The Raspberry Pi 3 boots up in 25 seconds to Desktop. 10 seconds to open Chromium browser. 25 seconds to load a google spreadsheet. Overall, faster than my AMD64 Windows XP laptop from 2009. :)
- Older version of RPi (Pi2?) - good for playing local videos - was pleasantly surprised to find that I could just put in the same micro-SD card which was running Raspbian 9 into a SD-card adapter and put it into the older Pi, and it booted and ran fine - did not need any reinstall.It is good for playing local videos. It could play 2 windows with 2 instances of VLC running local copies of 360p videos without any problems - 35% CPU for each instance, MP4 and DIVX respectively. But it could not play videos reliably over the network. Also, web browser Chromium takes a very very long time to open, web pages crawl to load. Probably because of the low RAM.But I can use it as a video player, with a status message at the bottom or something like that.
- Ubuntu 64 bit on the new Pi - https://www.raspberrypi.org/forums/viewtopic.php?t=220079sudo cp ~/Desktop/pi-bootloader/boot/* /mntInstead, doing this -with the image at
- Only xubuntu available for Pi - https://linuxconfig.org/
install-ubuntu-16-04-mate-or- ubuntu-18-04-on-raspberry-pi# h7-1-ubuntu-server-unofficial - wifi driver installation - https://www.youtube.com/watch?
v=nlLS8d4Z09c lspci -vvnn | grep 802lsusb does not show it when driver is not installed. - Cloning RPi with dd - https://www.raspberrypi.org/forums/viewtopic.php?t=46911
sudo fdisk -l
sudo dd bs=4M if=/dev/sdc | gzip > /home/your_username/image`date +%d%m%y`.gz
sudo gzip -dc /home/your_username/image.gz | dd bs=4M of=/dev/sdc - Enabling monitoring on RPi wifi - https://raspberrypi.stackexchange.com/questions/36747/enable-monitoring-mode-for-rtl8188cus-via-usb-on-raspbian
- How to loop in VLC - https://forum.videolan.org/viewtopic.php?t=78723 - and subtitles in vlc playlist maker.
- Adjusting Overscan on the RPi - https://retropie.org.uk/forum/topic/2371/using-composite-video-can-t-see-everything-on-the-screen/16
- Raspberry PI model comparison - http://socialcompare.com/en/comparison/raspberrypi-models-comparison
- Shortcut to edit text file - Exec=leafpad %U /home/pi/file.txt
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!
Sunday, March 04, 2018
Raspberry PI configuration link dump
Saturday, March 03, 2018
securing lighttpd
Brief notes on securing lighttpd, the light-weight web-server -
# deny access to all files below a certain path
$HTTP["url"] =~ "/certain-path/" { url.access-deny = ("") }
# deny access on all jpeg images to the Google bot
$HTTP["useragent"] =~ "Google" { url.access-deny = (".jpg") }
# deny access by referrer
$HTTP["referrer"] !~ "^($|www.ourhost.com)" {
url.access-deny = ("")
}
Friday, March 02, 2018
QHY camera glitch
Tried on another Linux machine - Acer running Ubuntu 16 - without any drivers installed - again, no dmesg messages.
Tried changing the USB cable - then a dmesg message was seen, detecting on a 'slow port'. Tried on the Macbook again after reinstalling the new SDK, now it was showing dmesg messages as well as LED lighting up - detected OK. Changed back to the original USB cable - everything still OK.
So, probably a combination of hardware and firmware issues.
Wednesday, February 28, 2018
excess CPU usage from Windows Update Agent

Tuesday, February 27, 2018
allowing smtp access to gmail for a GSuite account
The (admin of the domain or user?) would need to do the following:
Saturday, February 24, 2018
removing a recent audio file
Thursday, February 22, 2018
MAT types in OpenCV
| C1 | C2 | C3 | C4 | |
| CV_8U | 0 | 8 | 16 | 24 |
| CV_8S | 1 | 9 | 17 | 25 |
| CV_16U | 2 | 10 | 18 | 26 |
| CV_16S | 3 | 11 | 19 | 27 |
| CV_32S | 4 | 12 | 20 | 28 |
| CV_32F | 5 | 13 | 21 | 29 |
| CV_64F | 6 | 14 | 22 | 30 |
Wednesday, February 21, 2018
Sunday, February 11, 2018
easy way to save Octave figures as EPS
print -depsc test.eps
- prints current figure to test.eps - the c at the end indicates it will be in colour.
opencv and 3D
Looking at options for incorporating 3D data into opencv, and whether some other tool is better for that job -
export google charts as svg
Saw this post,
http://www.osmanoglu.org/computing/89-how-to-export-google-spreadsheet-charts-as-svg
but it doesn't seem to work that way any more.
Friday, February 09, 2018
using an old 1st generation iPad
How to install apps - from
https://apple.stackexchange.com/questions/135060/how-to-install-apps-which-require-a-newer-version-of-ios-on-a-1st-gen-ipad
1. On your old iPhone/iPad, go to Settings -> Store -> set Apps to Off.
2. Go onto your computer (it doesn't matter if it's a PC or a Mac) and open the iTunes app. Then go to the iTunes store and download all the apps you want to be on your iPad/iPhone.
3. If the iTunes on the computer and your iPad are both signed into the same Apple ID, and the iPad is connected to the internet, then go on your iPad/iPhone to App Store -> Purchased -> tap on an individual app you want to install.
4. You'll get a message that says "The current version requires iOS 6.1 or later, but you can download the last compatible version," just hit Download.
This method should at least allow you to have most apps on your outdated device. Most of them will work, but sometimes even once you have the app installed on your it still won't run correctly. That's just tough luck. But in my experience that's not too common; apps usually work just fine.
How to get ebooks on the ipad:
1. Using Amazon Kindle Store and Kindle App
2. Using direct links to pdfs, or email attachments - when opened in safari, they show a "Open in" button on the top. You can open pdf and epub in Freading, mobi in Kindle.
3. Using gutenberg.org
4. https://www.thebalance.com/places-to-get-free-kindle-books-1357954
5. https://www.mobileread.com/forums/ebooks.php?forumid=128
Thursday, February 08, 2018
converting csv files in google drive to google sheets
This stackoverflow answer seems to be good. Either download and re-upload after enabling "convert uploads" in Drive settings, or use an Apps script.
Wednesday, February 07, 2018
prevent emails from going to spam
For Windows Live and MSN Hotmail users:
For Google Gmail users:
For Yahoo! mail users:
For AOL mail users:
For Microsoft Outlook users:
Tuesday, February 06, 2018
signing out of google account on Android
This link has the details for Android 5.0+
On Android 5.0+, Settings -> Accounts -> Google -> Choose the account you wish to sign out of -> Menu with 3 dots on top right -> Remove account
On the LG Q6 running Android 8.1, there is a search field in settings where I can enter Accounts, and directly get listings of the Google accounts. Clicking on an account brings up a page with Remove account also listed.
creating a dashboard
Monday, February 05, 2018
New Google sites has support for custom urls with HTTPS
Looks like New Google Sites automatically provisions SSL certs after domain validation, but the cert takes 24 hours or so.
https://gsuiteupdates.
Friday, January 19, 2018
2G reception issue for refurbished mobile
Saturday, January 13, 2018
accessing archived emails from old CPanel server
Can you tell me how to copy the old emails from the old server before they shut it down?
Inside the cpbackups folder, there are the backups of each site. So, if you want the emails from sitename site for example, you can open the folder
/backup/cpbackup/weekly/sitename/homedir/mail
The archived emails will be in the archive subfolder. They are likely to be in the maildir format -
Wikipedia has a list of e-mail readers that can directly read e-mail in that format -
http://en.wikipedia.org/wiki/Maildir#Mail_readers
Friday, January 12, 2018
wavelab loudness normalization - recommended settings
Saturday, December 23, 2017
bulk deleting emails in horde
cd /home/username/mail
rm -rf cur
rm -rf new
Friday, December 22, 2017
some notes on rkhunter
1. I will now change the rkhunter configuration file so that the emails will come to me instead of coming to you. vim /etc/sysconfig/rkhunter
2. the hidden file warning message is about /etc/.brand which just says hostgator - it is just a branding file from hostgator. Totally harmless.
3. I will prevent ssh login without keys. That is, password-based ssh login using terminal will be disabled. This is a good security feature, since the ssh is routinely hit with brute force attacks.
4. It looks like rkhunter does not play nice with user-compiled or modified files. I will set up rkhunter to ignore all the currently available files, and only give warnings for new files. Basically by editing the whitelist, and running
sudo rkhunter --update
sudo rkhunter --propupd
https://www.linuxquestions.org/questions/linux-security-4/rkhunter-package-manager-fail-warnings-on-centos-5-running-whm-11-a-871791/
https://www.digitalocean.com/community/tutorials/how-to-use-rkhunter-to-guard-against-rootkits-on-an-ubuntu-vps
Sunday, December 17, 2017
AutoSSL feature of WHM
as root, as mentioned in the documentation.
So, no need of going through the painful process of WHM SSL certificate installation.
And if we want to redirect all users using http to https, we can use the htaccess file, as given here.
Sunday, November 26, 2017
phplist bounce processing issue
Based on a complaint received on 19 Nov, checked the server logs and found that Gmail is starting to mark our mails as spam because we're daily sending mail to bouncing gmail accounts.
PB went to the reconcile users page in phplist and looked at the process of unsubscribing users who have 15 and more bounces. (Found about 9,527 users) - but did not run it since this was not 15 consecutive bounces. Running the bounce processing manually, the bounce processing takes 3 hours, identifies the bounces, but does not unconfirm subscribers with 5 consecutive bounces. So, running bounce processing is not solving the problem. We needed to fix the bounce processing rules which are being applied.
PB found, checking for the location where the rules are defined and found that phplist is picking up rules from the database table. Table names: our_prefix_bounceregex and our_prefix_bounceregex_bounce. But those tables showed empty records. Did not find any web interface to add rules to these tables. Did not find a backup with entries. PB downloaded the sourcecode (version 2.10.10) from https://sourceforge.net/projects/phplist/files/phplist/ and checked the phplist.sql file that creates the database on a new installation. There too the records were empty.
(Edit: Found a discussion about this in the phplist manual here. )
Then, a quick and dirty fix implemented by PB on my request: in phplist web interface "view bounces" selected the message id 4189, got the list of email ids that had bounced for the message id 4189
mysql> select id,email,confirmed from our_prefix_user_user where id IN ( select user from our_prefix_user_message_bounce where message=4189);
- about 1147 records
Unconfirmed the users with the following sql update:
mysql> UPDATE our_prefix_user_user SET confirmed=0 WHERE id IN (SELECT user FROM our_prefix_user_message_bounce WHERE message=4189);
Query OK, 1146 rows affected (0.54 sec)
Rows matched: 1147 Changed: 1146 Warnings: 0
compiling siril
https://free-astro.org/index.php/Siril:install#Dependencies
I did the following to install dependencies on Linux Mint 18.1 -
sudo apt-get install gtk3*
sudo apt-get install cfitsio*
sudo apt-get install fftw3*
sudo apt-get install gsl*
sudo apt-get install libconfig++*
sudo apt-get install libraw*
sudo apt-get install libffms2*
sudo apt-get install libtiff*
sudo apt-get install libjpeg*
sudo apt-get install libpng*
Then running autogen.sh complained -
./autogen.sh: intltoolize: not found
and for that I did
sudo apt-get install intltool
sudo apt-get install libgsl*
This was enough to build it using
./autogen.sh
make
sudo make install
Thought about doing a full-fledged fork and pull request as in
https://akrabat.com/the-beginners-guide-to-contributing-to-a-github-project/
For that, I needed to set the ssh key, as in this stackoverflow post,
cat ~/.ssh/id_rsa.pub
and copied the key to github -> settings -> ssh key
git clone git@github.com:my-account-name/Siril-0.9.git
cd Si*
git remote add upstream git@github.com:lock042/Siril-0.9.git
git checkout master
git pull upstream master && git push origin master
git checkout -b feature/stackallmedian
It turned out that this version had a bug where stackall would cause a segmentation fault. This was fixed in version v0.9.8-beta3 which also had a stackall median command, which did not do normalization by default, so my problem was solved and I did not have code it myself to do the git pull requests and so on.
Sunday, November 05, 2017
more on SER, FITS and Octave
(from
https://unix.stackexchange.
which would create
s001
s002
etc upto
s830.
Unfortunately, Siril's stackall does sum stacking, and (at least according to my understanding, in version 0.9.7) was integer overflowing or showing some such behaviour - though the developers mentioned that it is supposed to convert to 64 bit, and then normalized to 16 bit. Maybe the normalizing was what was causing the issue. My data set had numbers like 44,000 per pixel and 102 frames, resulting in sums like 4,400,000 - even signed 32 bit int would only overflow at 2,147,483,647. Anyway, using the stackall sum stacking, I was getting plots like this
instead of plots like this.
Possible solution may be to implement a median stacking function for siril, like stackallmedian.
Edit: The siril team has now implemented median stacking using the command stackall median - and current branch has no normalization applied, so it works well for me :)
Friday, November 03, 2017
compiling QHYCCD camera SDK sample application with OpenCV
Tested the opencv installation, compiling and running webcam capture test code from http://henryhermawan.blogspot.
Followed the INSTALL file and compiled + installed the QHYCCD SDK.
| cmake -DCMAKE_INSTALL_PREFIX=/usr . |
| make |
Tried the sample without modifications -
cd sample
mkdir build
cd build
cmake ..
make
LiveFrameSampletest, SingleFrameSampletest and ControlCFWtest compiled without errors, but for CaptureDarkFrametest errors were reported, like
CaptureDarkFrame.cpp:76:83: error: invalid conversion from ‘int*’ to ‘uint32_t* {aka unsigned int*}’ [-fpermissive]
ret = GetQHYCCDChipInfo(camhandle,&chipw,&chiph,&w,&h,&pixelw,&pixelh,&bpp);
and so on.
Anyway, I was only interested in the frame capture tests, so I created LiveFrameSampleOCV.cpp from LiveFrameSample.cpp and made the following changes -
- Uncommented the #define for opencv support and made that line
#define OPENCV_SUPPORT 1 - Changed the set resolution line to
ret = SetQHYCCDResolution(camhandle,320,240, 320, 240);
(first two arguments after camhandle are dimensions, next two are position) - Defined an int key before the display loop, and changed the display loop to an infinite loop -
//ret = QHYCCD_ERROR;
//while(ret != QHYCCD_SUCCESS)
while(1) - Added a break on escape key,
key=cvWaitKey(30);
if (key == 27)
break; - Modified the CMakeLists.txt to uncomment
find_package(OpenCV REQUIRED) and
include_directories($(OpenCV_INCLUDE_DIR))
and also changed the link libraries line to
target_link_libraries(${FILENAME1} -lqhy ${LIBUSB_1_LIBRARIES} ${OpenCV_LIBS}
where the OpenCV_LIBS have been added. - Ran cmake .. from the build directory again, and then
make LiveFrameSampleOCVtest
While running cmake, it shows
-- Found libusb-1.0:
-- - Includes: /usr/include/libusb-1.0
-- - Libraries: /usr/lib/x86_64-linux-gnu/libusb-1.0.so
But could not build LiveFrameSample without using cmake - the gcc command needs some more work - this does not work -
gcc -Wall LiveFrameSampleOCV.cpp -o LiveFrameSampleOCV -l/usr/lib/x86_64-linux-gnu/ `pkg-config --cflags --libs opencv usb-1.0`
installing the latest OpenCV with Python bindings on Linux Mint 18.1
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential cmake pkg-config
sudo apt-get install libjpeg8-dev libtiff5-dev libjasper-dev libpng12-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install libxvidcore-dev libx264-dev
sudo apt-get install libgtk-3-dev
sudo apt-get install libatlas-base-dev gfortran
sudo apt-get install python2.7-dev python3.5-dev
OpenCV stable version is now 3.3.1, so
>>> cv2.__version__
'3.3.1'
>>>
https://www.pyimagesearch.com/2018/05/28/ubuntu-18-04-how-to-install-opencv/
Monday, October 30, 2017
SER, FITS and Octave
- SER capture is faster than PNG sequence capture - PNG was capturing at 20 fps or so, but dropping frames after 80 frames or so, and was taking the last 20 frames at around 5 fps. SER was not dropping frames at all. All this on the Menlo systems Lenovo laptop.
- Octave and Matlab don't open SER files without conversion, the definitive site for SER files seems to be http://www.grischa-hahn.homepage.t-online.de/astro/ser/
- After some back and forth on this thread, found that Siril can export SER to a sequence of FITS images without losing the 16-bit resolution.
- Imagemagick can be used to convert the FITS images to 16-bit TIFF using
mogrify -format tif *.fits - Alternately, the fits octave package can be used to read the data into Octave from the FITS files. Although Octave uses Imagemagick to implement imread, imread doesn't seem to work with the FITS files from Siril, complaining
error: Magick++ exception: Magick: Unexpected end-of-file (/media/mac/SAM2TB/Autocorr/2017-10-16/Capture/14_10_49/Capture_00002.fit) reported by coders/fits.c:370 (ReadFITSImage) - In order to install the fits package, had to install its dependency, with
sudo apt-get install libcfitsio*
and then run octave as root,
sudo octave
and within octave, run
pkg install -forge fits - Reading using the fits package and imread give different results.
imread returns uint16 rows x columns
read_fits_image returns double columns x rows, upside down.
So, for equivalence with imread, we need to use flipud.
b=read_fits_image('im.fits')
b=b';
b=flipud(b);
imagesc(b)
gives the same numbers as
a=imread('im.tif') - identify Capture_0035.png
can be used to check whether the png is 8-bit or 16-bit. - Installing ISIS and SER Player turned out to be dead-ends, since they did not convert SER to PNG without converting to 8-bit.
Saturday, October 28, 2017
removing malware/adware from Intex phone - trois
Finally I contacted my carrier Airtel via email - which seems to be the only way to reach their customer service department. They advised that I could Dial *121*51# (Toll Free) or 12181 (Toll Free) to check last 5 deductions which have happened in the last 72 hours. Using this information, I found that the SMS charges were to a number 9582943043. Googling, found that this is an "activation feature" on Intex phones!
https://together.jolla.com/question/139190/intex-aqua-fish-re-activation-sms/
Now I seem to have removed the offending Intex services - using Kingroot and root uninstaller - searched for sms in system apps, found SmsRegister - com.android.smsregister - uninstalled it. This seems to have solved the issue - no sms sent for the last one month.
Friday, October 27, 2017
a tale of redirects
http://firstdomain.org/seconddomain
Godaddy support, over the course of 3 days, told me that this was due to some redirects in the .htaccess file. But they could not fix it for me. Finally when I tried editing the .htaccess file, found that the issues were due to some redirects meant for the CodeIgniter framework, redirecting html files to their php equivalents. The original .htaccess was
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1 [L]
In order to make it work with the second domain, I added some conditions, and made it
# BEGIN WordPress
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.seconddomain.org$ [NC]
RewriteRule ^(.*)$ http://seconddomain.org/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^seconddomain.org$ [NC]
rewritecond %{REQUEST_FILENAME} !-f
rewritecond %{REQUEST_FILENAME} !-d
rewriterule ^(.*)$ /index.html [L]
RewriteCond %{HTTP_HOST} ^www.firstdomain.org$ [NC]
RewriteRule ^(.*)$ http://firstdomain.org/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^firstdomain.org$ [NC]
rewritecond %{REQUEST_FILENAME} !-f
rewritecond %{REQUEST_FILENAME} !-d
rewriterule ^(.*)$ /index.php?$1 [L]
Now both sites firstdomain.org and seconddomain.org seem to be working fine. www.firstdomain.org redirects to firstdomain.org and similarly www.seconddomain.org redirects to seconddomain.org.
Sunday, October 08, 2017
removing duplicates
and he found there were 144 such duplicated files.
Thursday, October 05, 2017
Sunday, September 24, 2017
Intex Aqua 4G Strong and Airtel 4G - solved
Phone tester was earlier indicating that this handset was not reporting GPS connections. Maybe it lacks antennae for GPS and LTE band 40? Using Phone tester with the Mi3 would take a couple of minutes for first connecting to a GPS satellite, and later, after closing and opening the app, would connect within seconds even indoors.
Edit: I emailed 121 at airtel dot com with my 4G connection issue. They called back in the evening, saying that it was an issue at their end, "we would like to inform you that due to some technical issue, internet service on your mobile was not working. However, we have reset the internet service for your mobile.
We request you to restart the handset before using the internet service."
I restarted after seeing their email, and the phone connected to 4G :)
updated budget airline flying experience
Ticket price was supposed to be Rs. 1600 or so for CCJ to BLR, hand-luggage-only fare. Somewhere in the online booking process, I was charged some more, so it became Rs. 1900. Somewhat comparable to the Rs. 1800 (Tatkal) II AC railway ticket price.
Ticket and ID is required while entering the airport. Security check was relatively hassle-free, no lines when I arrived one hour before my flight time. No tag needed for hand-luggage. CISF personnel insist on paper boarding pass so that they can rubber-stamp it - whether web check-in or normal check-in - so the mobile boarding pass is not of much use. They also asked me to take out electronic items from my bag and put them on a tray for X-ray. The waiting lounge was full of passengers - Air India flight to Mumbai was four hours late, those passengers were being provided with breakfast in the lounge when we were boarding. Low-floor buses to and from the aircraft at both airports, a Cobus 3000 at BLR.
As noted in my previous post, the flight attendants are a bit rushed for time, trying to manage the very short turnaround times. They were doing the safety drill when the aircraft was rolling towards the start of the runway, just completing when it started the takeoff run. The Bombardier Q400 managed the 350 km trip in just 35 to 40 minutes of flying time. Another five minutes for taxiing and so on. A bit of turbulence over the Western Ghats as usual - maybe for five minutes or so. Also a big downdraft just before landing. Otherwise quite smooth. The pleasant-mannered cabin crew managed to serve pre-booked meals and free water for quite a few passengers during this short flight.
The flight seemed to be full - I had chosen the last row window seat, 20D, for the little bit extra legroom. At nearly six feet, I was reasonably comfortable, with an inch or two to spare between my knees and the seat ahead. But the seat reclines only a couple of inches.
Overall a good experience, with only the taxi fare from the airport being an extra cost as compared to the train journey.
Monday, September 04, 2017
upgrading from Korg Nanokontrol to Nanokontrol2
http://hnsws.blogspot.in/2010/08/korg-nanokontrol-and-reaper.html
with the important difference that the Nanokontrol2 had to be plugged in keeping the
Cycle and Set
buttons pressed to make it go into the MIDI CC mode, as mentioned in the instruction booklet supplied along with the device.
I tried rebooting the computer, the setting seems to be remembered. So, probably for daily use, this pressing of buttons at startup may not be needed.
In case you have issues with it, you may need to disconnect the Nanokontrol2, and connect it back keeping Cycle and Set buttons pressed.
(Specific to our use - other functions are similar as before, except that there are 3 buttons for each row instead of 2 for the earlier Nanokontrol - the lower buttons are mapped to SOLO for the slider tracks, the upper buttons are mapped to SOLO for the knob tracks. The middle buttons are left unused for now.)





