Thursday, 20th September, 2018

Search specific text in MacOS

Spotlight search is great if you’re looking for file or folder names. But to search for specific words inside text or code files in a folder, the following command line method is much more effective.

Step 1: Open the Terminal app, use the cd command to navigate to the folder where you want to search for your desired text or file name.

cd ~/Deb/Sites/project1/wp-content/themes/twentyseventen/

Step 2: Use the grep command to search inside this folder & folders further inside it.

grep -ir 'space_below' .

MacOS command grep

Here space_below is the word you are looking for. You can also search for text with quotes such as class or ID names by doing 'class="container"'

Notice the quotes & the dot in the 2nd step, they are required. This should be particularly useful for developers and writers who deal with text & need to find very specific ones.

Monday, 17th September, 2018

Tracking my visitors

Is something I don’t do. I don’t have any analytics or visitor tracking script installed on my site, so I have no idea how many people visit my site & which country they are from. I like it that way.

Tuesday, 11th September, 2018

Slothilda

Slothilda is the only web comic I subscribe to & truly enjoy.

It’s minimal, animated style comics, sent to my inbox infrequently really appeals to me.

The designer has an upcoming printed book, below is the trailer for that book.

Wednesday, 8th August, 2018

How to receive SMS while outside India

When you are travelling outside India, if you have wifi or a SIM of that country to get mobile internet, and using that to make Whatsapp calls etc, and you just need to receive SMS from India for some essential services such as One Time Passwords then read this.

You do not need to buy an international roaming pack just to receive SMS. Receiving incoming SMS from India to your mobile while you are abroad is FREE, you do not pay anything for that. You just need to have main account balance of around Rs 200/300 or so.

So whenever I need to use a service that sends an OTP to my Indian mobile number, such as while logging into my your bank account, I do this:

  • Disable mobile data (important)
  • Switch off mobile
  • Remove foreign SIM
  • Insert Indian SIM
  • Switch on mobile
  • Let it automatically search for & connect to a network in that country with whom my Indian mobile network has an agreement.

After I get network signal on the mobile I login to the service which needs to send an OTP and I get it instantly.

Tuesday, 31st July, 2018

Bus stop & train station near Grand Palace Bangkok

If you are looking to use public transport other than the boating system to go to the Grand Palace in Bangkok & come back then this information is for you.

The Hua Lamphong MRT [underground train] is the station closest to the palace. You can get there by MRT trains or BTS trains [sky train]. Then the bus station near to this MRT should have a bus number 1 which will drop you at one of the stops near the palace.

Royal Thai Navy Club

Similarly bus number 1 will take you back from one of the bus stops near the palace to the Hua Lamphong MRT.

Grand Palace being a large area there are several bus stops around it, so it is important to recognize this bus stop. Look for the bus stop in front of Royal Thai Navi Club & besides a group of food stalls/market area. Also “Thanon Maha Rat” will be written on a board near this stop.

Grand Palace Bus Stop

The fair is 9 Baht per person one way between this bus stop & the bus stop near the MRT station.

Friday, 27th July, 2018

Living in Bangkok, Thailand

We have been staying in Bangkok since a week, one more week to go. Thais are a great bunch of hospitable people. Good amount of fruits have already been eaten.

Friday, 6th July, 2018

Error reading file ‘UNOPENED’ (Errcode: 5 – Input/output error)

If you get this MySQL error Error reading file 'UNOPENED' (Errcode: 5 - Input/output error) while importing a .sql file into your database via the command line, then chances are your sql file is corrupted, was not exported/downloaded properly. Export the file again & try, it worked for me.

Friday, 15th June, 2018

PayPal vs TransferWise

I have been using TransferWise to get paid since more than a year, so I can safely claim TransferWise is way better than PayPal.

I end up paying 1 to 1.5% fees when getting payment via TransferWise, while PayPal used to take approximately 4.5% in fees.

TransferWise sends the money much faster to the bank account, usually on the same day.

PS: I wish TransferWise paid me to say this, but they didn’t. But then with their lower fees it has kinda paid for itself, so may be they did?!

If you use my link transferwise.com/u/debasishp to sign up they will give you a free international transfer of up to £500. And if 3 people sign up using my link then I will get £50.

Monday, 14th May, 2018

Bhubaneswar – Tirupati Round Trip

We went on a road trip in our car from Bhubaneswar to Tirupati & came back.

Saturday, 28th April: Bhubaneswar -> Visakhapatnam.

Sunday, 29th April – Friday, 4th May: Visakhapatnam -> Vijayawada. Stayed in the week days & worked.

Saturday, 5th May: Visakhapatnam -> Tirupati.

Sunday, 6th May: Visited Venkateswara temple on Tirumala hills.

Sunday, 6th May – Thursday, 10th May: Stayed at Tirupati in the week days & worked.

Friday, 11th May: Tirupati -> Vijayawada.

Saturday, 12th May: Vijayawada -> Visakhapatnam.

Sunday 13th May: Visakhapatnam -> Bhubaneswar.

Drove 2625 kilometers.

Burned approximately Rs 11000 of petrol.

Paid Rs 2832 at 36 toll booths.

The road is mostly scenic with great 6 lane between Vijayawada – Tirupati.

Friday, 13th April, 2018

My laptop turned 7 today

I had purchased my current MacBook Pro on 13th April 2011. My primary & only computer. I use it daily for rigorous web development work & entertainment. Everything I have is because of this machine. It is still going strong.

Specs: 13-inch, Early 2011, 2.3GHz Intel Core i5 processor, upgraded to 8×2 1600 FSB DDR3 RAM, 320GB SATA HDD.

Issues: One single green vertical line on left side of screen, some grey smudge looking spots on one area of the screen, DVD player not working, card reader not working, internal audio is not good, color coating gone off from 8 keys, on its 2nd battery, on its 3rd power adapter.

So if your question is how long a Apple laptop will last, the answer is atleast 7 years. I am not even married that long!