I did this back in 2009. Here's how to do it. Pick a technology stack that you want to get a job in and build a side project in your spare time. Attend meetups with experts in your local community and learn how to make it awesome. Build relationships with them along the way. Use those relationships to get some part-time contract work in said technology stack with someone local. Document this experience and build up a…
At least in my experience as a contractor, people are looking for contractors because they have lots of experience in this technology but don't have the resources or time to devote to their project full-time. So if you have little experience in a tech stack, you may have a hard time finding this kind of work.
I simply built a side project (I did this with Rails) and then got hired full-time at a startup to do Rails work. As with everything, YMMV.