How to cross post status update from Google+ to Facebook?

Though I signed up on most of the popular social platforms I am addicted to Facebook more than anything. But most of my Google Fan Boi friends are now newly launched FB clone Google+ fans. So they end up posting “things” on G+. Well, I have found a solution to cross post the thing, NOT THE COMMENTS, from Google+ to FB. There are some limitations on what all you can share. Here is how to do it.

  • Log on to Facebook and then go to http://www.facebook.com/mobile/
  • Locate the section “Upload via Email”, in this section you will see, what FB calls, a personal email address. Note that this is not your @facebook.com email address.
  • Note down the address, copy paste it somewhere or keep the page opened.
  • Sign into Google+
  • Go to “Circles”.
  • Create a circle and name it.
  • In this circle add, “Add a new person” and use your personal email address which facebook has given you.
  • Name the this contact.
  • Save the circle.
  • Now go to “Stream” page
  • Try to share some “thing”.
  • Before you hit “Share” button, click on Add circles or people to share with and choose the Circle that has your personal Facebook email.
  • Share the “thing”
  • Check your Facebook newsfeed. Voila!!!

I request all my G+ friends to please share things with Facebook till the time I have all my friends on G+. Moreover I find G+ very strange, people I dont know have added me into their circles. And I tried to follow some celebrities but they simple spam my “Stream”. Even if I comment my comment is lost in 200+ other comments.

find & replace in multiple files using egrep & sed

Programmers are lazy creatures. Any given programmer would love get things done with lesser keystrokes. For instance, find and replace all in multiple files. I was setting up a project on my localhost that some other guy had done. That guy wasn’t a real programmer otherwise what I did would have not been required at first place. The great soul hard-coded all the hyperlinks. What now? I thought of firing an editor and doing a find and replace all by creating a project. Simple. No. I can use grep/egrep to find things then obviously I can chain it to some other command and replace that text. Yes. I am lazy, so instead of experimenting I did some googling. Here is how to do this. Find all files, recursively of course, in current working directory that contain “teh” and replace them with “the”.

egrep -lRZ "teh" ./ | xargs -0 -l sed -i -e 's/teh/the/g'

egrep/grep takes further arguments like type of files to look for, example egrep “teh” *.txt ./ will search for all text files in current working direcotry that contain “teh”. Cool!

So, you can safely say, I can haz teh Linux power!