As the great American philosopher Kenny Rogers once said, "you got to know when to hold 'em, know when to fold 'em."

Jim Cramer channeled The Gambler last night in offering up three stocks during last night's Sell Block segment on "Mad Money" -- Wind River Systems ( WIND), Axsys Technologies ( AXYS), and Intuitive Surgical ( ISRG).

Cramer recommended Wind River a year and a half ago, saying then that a takeover of the company was on the horizon. Shares in the Alameda, CA-based embedded software maker have gained 35% since.

Cramer's prescient call paid off yesterday, and now he said it's time to take the profits. Intel ( INTC) announced its acquisition of Wind River for $11.50 in cash, or $884 million. The deal is Intel's first in nearly a decade and could signal a move for the company beyond computer chips and into gadgets. Reportedly, Intel is eying other product markets, like smart phones -- and it just so happens that Wind River software can be found in products from Alcatel-Lucent, Verizon, BMW, Boeing and NASA.

But after the announcement, some analysts downgraded the company, saying it's unlikely Wind River will see another competing bid.

Axsys Technologies, too, saw a bid come in yesterday. This one, from defense giant General Dynamics ( GD) yesterday, was for $54 a share. By pegging the total value of the deal at $643 million, General Dynamics is buying the chance to play in markets beyond tanks, destroyers and submarines. The Connecticut-based Axsys specializes in making sensor systems for cameras and lenses. This marks an opportunity for General Dynamics to engineer products for wars and covert operations of the future involving long-range surveillance and infrared cameras.

If you liked this article you might like

Google's Waymo Teams With Intel on Self Driving Technology

Buying Nvidia Now Is Like Getting Intel Way Back in 1993, Jim Cramer Says

Amazon, Google and Other U.S. Tech Giants Face a Battle Over Taxes With Europe

S&P 500 and Dow on Track for Records With Markets in Good Mood Ahead of Fed

Cramer: Nvidia Is More Than Just a Pet Name