Search and Replace string with SED

sed (Stream Editor) is a tiny cool tool shipped in most linux distros. most of the times I use sed to lookup for pieces of strings in my projects and replace them in cases that I’m moving them from one environment to another.

 to run sed for search and replace purpose on a single file you can do:

The above command will look up the file.txt in and search all occurances of ‘oldstring’ to ‘newstring’.

To do this in a recursive mode and all the files in a directory you can mix it up with find command.

note I’ve passed “.” as the target directory to find, means I should be in the directory that I wish to run the search in. you can also replace “.” with the path of the directory you wish to do your search and replace in.

Install oci8 Extension on CentOS 7 cPanel Server

Today I had to assist a client on setting up his cpanel server to be able to connect to their oracle instance, so I had to get oci8 up and running.

We need to download basic and sdk instant client packages first. Download them from here (if the link doesn’t work due to the article being outdated please Google them) then install them by running:

once that is done we can install oci8 using pecl. if you are using easyapache 4 it means you probably have multiphp enabled. so there is a pecl in each of the php versions bin directory.

install the oci8 using pecl in your desired php version by running :

you can change php71 to php70.

Enable your iCloud Backup right now cause the iTunes Backup Suck!

I tweeted a short video few days ago expressing my anger towards apple update which made the touch screen not responsive in the welcome or “hello” screen. So here is the complete story.

I’ve always hated how apple thinks, although for the past 2 years I’ve been using apple devices daily specially Macbook Pro as my daily driver but it never took away a bit of my disagreement with the way they control how customers use their device.

Last Thursday my boss seeked my help to assist him to migrate his everything from his old iPhone 6s to his newly purchased iPhone X. Well this shouldn’t have been an issue at all because I’ve done that many times without issue but ever-since iOS 11 there were many weird instability bugs doing all these. The older iPhone was running iOS 10, typically I used to be able to make a full backup using iTunes and restore it while setting up the new device. This has been always working out for me but this time I was out of luck.

Continue reading Enable your iCloud Backup right now cause the iTunes Backup Suck!

error: RPC failed; curl transfer closed with outstanding read data remaining

There are usually issues with cloning large repositories over http. this can be due to web server settings, the backend and etc.

Well today I had to clone a big repo off a phabricator instance and I was getting “error: RPC failed; curl transfer closed with outstanding read data remaining” all the way.

after lots of try I found this solution posted on stackoverflow which seemed to be working in my case.

Hope it can help you too if you are looking at this page right now.


Incoming search terms:

  • brew installtion error: RPC failed; curl 18 trasnfer closed with outstanding
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1824 yxFD11HZa3zOJ7egqYE_5K8kKfuof1DpCw_MILXvVE9Hg4D-vtsslryyVyv59_oW 7dc174ee743bd51152280c8faf5fd5d8d1390086&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme