You can do this, but you cannot gain eligibility immediately after you give large gifts. There is a 30 month look back period in California, so you are ineligible for 30 months after you divest yourself of assets.