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

Run and monitor Laravel Queue using PM2

In most cases you’d use supervisor.d or some other monitoring daemon to after queue worker process in Laravel applications, However the propose of this post is just to say that you can use PM2 to run and monitor your artisan process.

Basically the reason I go with pm2 is that I have few nodejs scripts running on my server so it would be a good reason to use pm2 for running my queue runner.

To get pm2 to run artisan run following command:

This would run a pm2 process named laravel-worker which you can then see in your pm2 list output.

if you are not yet running pm2 in start up make sure you run pm2 startup to ensure your processes run once your machine is rebooted.

Reindex Spotlight and All My Files

Spotlight and All My Files can be a real time saver tool on mac but if you are a developer with lots of junk scripts within your project that can go messy. luckily we are able to exclude folders and files in spotlight privacy settings, but adding them to the privacy section will not immediately remove them from spotlight index.

The solution to this is to manually force spotlight to rebuild the index by executing following command in terminal:

running this alone is not enough tough. make sure you restart your mac and it should help with spotlight respecting your privacy setting.

removing wordpress malware infecting js files.

A recent WordPress malware is targeting WordPress websites by injecting a piece of malicious code into every single JavaScript files (mostly libraries specially Jquery) which acts maliciously by redirecting the visitors to advertising affiliate sites.

Example injected code:

Well I came to know about this when a client approached me to clean his hacked website. after looking for this pattern within the files on his WordPress directory I came to find that over 600 Javascript files were injected with the code above.

I have gotten the above result by doing a grep in the public_html folder. following command was used to do a recursive grep looking for matching malicious variable name:

looking at the above commands result I found a file named db.php was uploaded to one of the plugins folder which a simple get request to that php file would case of that mass injection to all javascript files.

now lets get rid of the bad stuff in all files by using sed in combination of grep command as below:

This will remove the pattern from each single file that contains it.


Incoming search terms:

  • https://hazaveh net/2017/02/removing-wordpress-malware-infecting-js-files/
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1835 CiGfGuU2ao40SDvubJnd7_lcxMapruAOWD5LCQYPHAV7Uc7AV5I4ZenAYXrIXHjv d0dfbc0346dbc9792fe15682ba7fe380cdb66c6a&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • \x34\x32\x2E
  • _0xaae8 database