Monday, December 19, 2022

Monday, September 05, 2022

Enable rsa based key authentication on Ubuntu 22

 https://askubuntu.com/questions/1409105/ubuntu-22-04-ssh-the-rsa-key-isnt-working-since-upgrading-from-20-04

Sunday, June 19, 2022

ESIM activation in T-Mobile S21 Ultra

 It's been a while I am searching for a solution to activate eSIM on my T-Mobile S21 Ultra. T-Mobile or Samsung versions of instructions don't work.

Here is how to get it work.

1. Remove existing T-Mobile sim card and transfer it to a spare phone. You may not receive texts right away- so open a browser and navigate to https://messages.android.com or https://mesages.google.com. Open your android message app and hit link a device from the three dot menu. Scan the QR code and you will receive your texts in your browser.

Go back to your S21 Ultra's settings and navigate to eSIM menu. Click on add a plan and chose to transfer data from an old phone. Since my S21 is T-Mobile branded, it asked if my old phone is from T-Mobile. At this point, you need to login to your T-Mobile account. Next prompt will be for the number you want to transfer to eSIM. Choose your actual number. Follow onscreen instructions and you are all set. 




Sunday, December 16, 2018

Ever felt angry about a terrible PDF document with tabulated data you like to analyze in spreadsheet? I did. I tried a lot of tools, including Adobe's import to table feature. Adobe Acrobat Standard at times can get the job done with some pretty poor formatting error.
Now, check out Tabula. It's a Java based tool, so, works in all platform. On execution, a web browser pops open where you need to upload you table filled PDF and ask Tabula to process it. On a next screen, you can pick and choose your table and tabula will do its magic to extract the table and export it to csv if you like.
For the most part, it works like a dream.

Wednesday, March 30, 2016

Operation Canon EF-S 17-55 f2.8


Craigslist can be the best place for picking up great deals on photography stuff if you are willing to take some risk. This preowned EF-S 17-55 f-2.8 was purchased from CL for $400, almost 1/2 off sticker price. The autofocus of the lens works great but manual focus ring is loose and was hated across board for shoddy construction. So, after a quick a google around, I go into operation table with my newly acquired tool. Below is the step by step dissection of the lens till i reach the focus ring. Tightening it up and put it back together in one hour. On my way, I had to deal with some very tiny screws and magnetic tips came in handy.





















Wednesday, July 29, 2015

United airlines UA82 and UA83.

I had the luck of flying out of Newark to new Delhi on United UA82 and coming back on UA83. Being spoiled by the asian airlines, I was expecting somewhat newer planes but was dumbfounded with the look of dated Boeing 777-200 that United was operating out of Newark.
these planes do not have personal air fan outlets. So like it or not, you are stuck with the common airflow of the plane. The entertainment system was sketchy at best. half the time the screen does not respond to my touch. Selection was good while I was able to use the proper touch. Another annoying thing about our plane, the downward graded food table. So putting anything in your food tray can spill right on your pant. Never had that before.
Now here is biggest peeve, the food. United decided to have some scumbugs to do their inflight menu selection. It was a complete mess and bears no resemblance to food from from anywhere of this world. It was out of ordinary in a bad way. Never in my life I have seen sausage served with a hot indian mango pickle. Food was still bad on my return journey, but it was slightly more edible.
So my advice, if you are flying out of Newark on UA82, pack your little box of comfort foods.

Thursday, June 18, 2015

Excel tricks-
I needed to generate fake data set for a project to verify the scalability of a db project. Need to create a string of random set of words in a cell. So here is my solution. It will okk for a cell that is no tblank in column A. It will index from cell A1 to A10 and create a random order of the indexed words in column B.


=IF(NOT(ISBLANK(A1)), INDEX($A$1:$A$10, RANDBETWEEN(1, ROWS($A$1:$A$10))))

Tuesday, April 22, 2014

Galaxy Note 2 battery drain after Android 4.3 upgrade

My Galaxy Note 2 was recently upgraded to JB 4.3 from a very old JB 4.1. To my horror, I saw my battery was draining like crazy and charger can not keep up with the drain when wifi is on. Initially I thought it is misbehaving app perhaps and therefor did a factory reset. That did not solve the problem. Went back to google and found out there may be a solution by enabling "developer mode". To achieve this small feat you need to click on your device properties and tap on 10 times (you read that right, so intuitive) on base band information. After that, everything seems normal now.

Tuesday, March 25, 2014




Monday, March 03, 2014

Ref- http://www.ramil.pro/2013/01/bash.html

1) If condition

There are 3 options:

1) if..then..else..fi

2) [ condition ] && ( expression-if-true ) || ( expression-if-false )

3) test condition && expression-if-true || expression-if-false

2)  Loops

1) Standard for..in

for arg in list;
do
 commands
done

2) C-like for (attention! double brackets!)

for (( i=1; i <= 10; i++ ));
do
 commands
done

3) While loop

while [ condition ];
do
 commands
done

or 

while (( C-like condition ));
do
 commands
done

4) Until loop

until [ condition ];
do
 commands
done

break [N] - exit the loop
continue [N] - start over

Example:

for (( j=0; j<3 -gt="" arr="" code="" do="" done="" fi="" for="" i="" if="" j="" then="" tmp="">

3) Functions

function function_name {
 commands
}

or

function_name() {
 commands
}

exit and return just work as usually

4) Arrays


declare -a array - declare the array first

define value:
a[13] = "foo"

retrieve value:
${a[13]} - only this way!

5) Strings

String length:
str="string"
len=${#str}

Substring:
${str:pos}
${str:pos:len}

Remove part of string:
${str#substring} - remove the shortest part from the beginning
${str##substring} - remove the longest part from the beginning

${str%substring} - remove the shortest part from the end
${str%%substring} - remove the shortest part from the end

Replacement:
${str#substring/replacement} - from the beginning
${str%substring/replacement} - from the end

6) case..in..esac 


case $variable in
condition 1)
 actions
;;
condition 2)
 actions
;;
esac

7) I/O

Read the input:
read -p "Input string: " str
echo $str

8) Features

$@ - arguments array
$1$2$n - arguments in order
$0 - program (self) name
$# - arguments number
$* - all arguments as one sting
$_ - last argument of the last command
$? - previous command return code
$$ - own PID
$! - PID of the last background process
!! - previous command as a string
(( a += 1 )) - double brackets let us code like C

$RANDOM - returns a pseudorandom value within 0..32767

declare -r constant - declare as read-only
declare -a - declare as array
declare -i - declare as integer

Tuesday, December 10, 2013

Source- http://groups.yahoo.com/neo/groups/linux_ipsr/conversations/topics/5818
http://192.168.1.125/~web/cgi- bin/webmo/login.cgi
WEBMO configuration for Ubuntu 10.04 [  Apache/2.2.14 (Ubuntu)  Server at  192.168.1.125 Port 80  ]
1) sudo apt-get install Perl 
2) sudo apt-get install libapache2-mod-perl2
3) sudo apt-get install VIM
4) $ sudo a2enmod module_name        
 (i) cgi,
(ii) cgid and
(iii) userdir 
         

 5) $ sudo /etc/init.d/apache2  restart
6) $ cd  ~
7) $ mkdir /home/web/public_html/webmo
8) 
$ mkdir /home/web/public_html/cgi-bin/ webmo


  • htmlBase: /home/web/public_html/webmo
  • cgiBase: /home/web/public_html/cgi-bin/ webmo
  • userBase: /home/web/webmo

9) $ cd /etc/apache2
10) $ sudo gedit  sites-available/default
11) ScriptAlias /cgi-bin/ /home/web/public_html/cgi-bin/
                     ScriptAlias /cgi-bin/  /home/web/public_html/cgi-bin/ webmo                    

 12) $ sudo /etc/init.d/apache2  restart

13) $ web@ubuntu:/etc/apache2$ sudo cp default defaultxyz

14) /etc/apache2/sites-enabled/

15) ln -s ../sites-available/default

13) $ web@ubuntu:/etc/apache2$ sudo cp default defaultxyz
14) /etc/apache2/sites-enabled/
15) ln -s ../sites-available/default
13) $ web@ubuntu:/etc/apache2$ sudo cp default defaultxyz
14) /etc/apache2/sites-enabled/
15) ln -s ../sites-available/default
13) $ web@ubuntu:/etc/apache2
$ sudo cp default defaultxyz
14) /etc/apache2/sites-enabled/
15) ln -s ../sites-available/default13) $ web@ubuntu:/etc/apache2$ sudo cp default defaultxyz
14) /etc/apache2/sites-enabled/
15) ln -s ../sites-available/default13) $ web@ubuntu:/etc/apache2$ sudo cp default defaultxyz
14) /etc/apache2/sites-enabled/15) ln -s ../sites-available/default

web@ubuntu:/etc/apache2$ sudo vim sites-available/default

    ServerAdmin webmaster@localhost

    DocumentRoot 
   
        Options FollowSymLinks
        AllowOverride None
   

   
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
   


    ScriptAlias /cgi-bin/ /home/web/public_html/cgi-bin/ webmo
   
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                SetHandler cgi-script
        Order allow,deny
        Allow from all
   


    ErrorLog /var/log/apache2/error.log