An alcoholic Manhattan court stenographer went rogue, channeling his inner “Shining” during a high-profile criminal trial and repeatedly typing, “I hate my job, I hate my job” instead of the trial dialogue, sources told The Post.

The bizarre antics by Daniel Kochanski, who has since been fired, wreaked havoc on some 30 Manhattan court cases, sources said, and now officials are scrambling to repair the damage.

One high-level source said his “gibberish” typing may have jeopardized hard-won convictions by giving criminals the chance to claim crucial evidence is missing.

Kochanski’s botched transcripts include the 2010 mortgage-fraud trial of Aaron Hand, who was also convicted of trying to hire a hit man to take out a witness against him.

A source familiar with the case said Kochanski’s transcripts of that trial were a total mess.

“It should have been questions and answers — instead it was gibberish,” the source said.

And in a scene right out of 1980’s “The Shining,” where Jack Nicholson’s off-the-rails writer repeatedly types “All work and no play makes Jack a dull boy,” a source said of Kochanski: “He hit random keys or wrote, ‘I hate my job. I hate my job. I hate my job,’ over and over.”

Claudia Trupp, of the Center for Appellate Litigation, said her office was handling the appeals in Hand’s and nine other cases.

“I never had a situation where a single court reporter was responsible for so much damage,” she said.

Kochanski, 43, was fired in March 2012 for misconduct, said Office of Court Administration spokesman David Bookstaver.

Sources said the Manhattan DA’s Office arrested Kochanski and forced him to try to make sense of his shorthand typing.

But that effort apparently failed. Judges have been holding “reconstruction hearings” at which everyone involved in a case has to testify about what they remember.

“This situation is terrible for everybody,” Trupp said. “It’s very difficult to come up with a sufficient record based on everybody’s recollection years after the event.”

The troubled stenographer’s dad, Ed Kochanski, said his son “became an alcoholic” about five years ago, costing him his marriage and job.

He said his son was in rehab when they last spoke about three years ago.

Ex-wife Heather Kochanski said, “The pressure of that job pushed him over the edge, leading him to lose everything.”

By phone Wednesday, Kochanski denied screwing up his transcripts.

“I never typed gibberish. I always did my job 100 percent. I was let go because of substance abuse,” he said.

“I’m in recovery. July will be one year I’m clean,” he said.

Additional reporting by Steven Hirsch and Laurel Babcock