It comes from the preface of the קיצור שולחן ערוך - the Abridged Code of Jewish Law. The מחבר - or the compiler warns not to give up in the face of those who mock you. This is somewhat synonymous with the first chapter of psalms, "ובמושב ליצים לא ישב" - "In the abode of jokers he did not sit."