Legislation to avoid a US government shutdown at midnight on Friday advanced in Congress as the House of Representatives on Thursday night approved an extension of federal funds through Feb 16.