This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Transform } from 'stream'; | |
import { spawn } from 'child_process'; | |
import build from 'pino-abstract-transport'; | |
export interface Options { | |
logLevel: string; | |
} | |
export default function transport({ logLevel }: Options) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Initialize-Omp { | |
param( | |
[string] $Config, | |
[string] $Theme | |
) | |
$OmpPath = "$(brew --prefix oh-my-posh)" | |
if ($Theme) { | |
$Config = "$OmpPath/themes/$Theme.omp.json" |
If you are convicted of, or forfeit bail for, a moving traffic violation occurring in this, or any other State, points will be entered on your Alaska driving record. Assigned points are based on the following schedule:
- Operating a motor vehicle while privilege to do so is suspended or revoked or in violation of limited license......................................................................................... 10
- Driving while intoxicated / under the influence ............................................................. 10
- Reckless driving ........................................................................................................... 10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::os::unix::net::UnixStream; | |
use std::net::Shutdown; | |
use std::io::{BufRead, BufReader,BufWriter, Write}; | |
use std::thread; | |
use anyhow::{Result, Error}; | |
use clap::{Parser, Subcommand}; | |
// use miette::{Diagnostic, SourceSpan}; | |
// use thiserror::Error; | |
use rustyline::error::ReadlineError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { IncomingMessage, ServerResponse } from 'http'; | |
import { inject, RequestOptions } from 'pickleback'; | |
import { Opts, defaults } from '../opts'; | |
export interface TestHarness<R> { | |
(reqOpts: RequestOptions, opts?: Opts): Promise<R> | |
} | |
export interface TestHandler<R> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = ({ forward, listen, match, proxy, whenever }) => { | |
// dokuwiki | |
listen(80, () => { | |
whenever(match('/'), | |
forward('localhost', 8080) | |
); | |
}); | |
// pulp | |
listen(24816, () => { |
I was trying to build the yq PyPI package on COPR and I got an error. Here's the relevant snippet:
+ /usr/bin/python3 setup.py test
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
running egg_info
writing yq.egg-info/PKG-INFO
writing dependency_links to yq.egg-info/dependency_links.txt
writing entry points to yq.egg-info/entry_points.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I wanted to use https://npm.im/terminal-image in kitty. Kitty supports | |
// inline image functionality similar to iTerm2, and while I was too lazy | |
// to look up whether they're the same I *wasn't* too lazy to try and make | |
// terminal-image think it's running in iTerm2. | |
// | |
// So you dig down the dependency tree. terminal-image is by @sindresorhus, | |
// who is known for two things: | |
// | |
// 1. Going hard on es modules without support for require | |
// 2. Going hard on micro-modules with deep dependency trees |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
FILE="${1}" | |
EXTENSION="${FILE##*.}" | |
case $EXTENSION in | |
pdf) | |
pdftotext -layout -eol unix -nopgbrk "${FILE}" - | |
;; | |
jpg|jpeg|gif|png) |
NewerOlder