Rubbing of any kind for sexual pleasure; masturbation, of oneself or another. Probably from Latin frico (rub) or frictio (rubbing). Also used as a semi-euphemism for _fuck_ by itself or in phrases. Usually derogatory or contemptuous.
"We found out where Jack was -- frigging in the supplies room again." "Frigging in the rigging." "Frig off." "He is so frigging crazy."
(Term used by engineers) To make a rough-and-ready, quick-and-dirty adjustment to something to make it work or to make it operate in a particular way. To adjust manually for a particular purpose. Can be used of a physical device but also of a computer program, etc.
"Since I'd figured out how it worked, I decided to frig it so it output
the data exactly how *I* wanted it."