The easiet way is to sell it on eBay.
I sold a one year old MBP on eBay last summer. The warranty had just expired on it a month before I sold it. The new owner got it and found out that the battery would not hold a charge even though it only had 11 cycles on it. I never used it on battery power and those 11 cycles were from the power cord pulling away from the laptop without me knowing. The new onwer simply took the laptop and battery to the Apple store and gave her a new battery free of charge.
Any warranty will tansfer to the new owner.