Expand your skill set. Having more skills and showing independent learning are both valuable to current and perspective employers.
You cannot prevent companies from making dumb decisions during layoffs. I was once hired and then laid off 5 weeks after starting.