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 * as fs from "fs/promises"; | |
import * as path from "path"; | |
export async function exists(path: string): Promise<boolean> { | |
return fs | |
.access(path, fs.constants.F_OK) | |
.then(() => true) | |
.catch(() => false); | |
} |
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
if type fnm > /dev/null; then | |
export FNM_MULTISHELL_ROOT="/run/user/$UID/fnm_multishells" | |
export FNM_LOGLEVEL="info" | |
export FNM_VERSION_FILE_STRATEGY="local" | |
export FNM_MULTISHELL_PATH="$FNM_MULTISHELL_ROOT/$$" | |
export FNM_COREPACK_ENABLED="false" | |
export FNM_DIR="$HOME/.local/share/fnm" | |
export FNM_ARCH="x64" | |
export FNM_RESOLVE_ENGINES="false" | |
export FNM_NODE_DIST_MIRROR="https://nodejs.org/dist" |
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::{fs, io, path::Path}; | |
fn file_or_stdin<P>(path: Option<P>) -> io::Result<Box<dyn io::Read + 'static>> | |
where | |
P: AsRef<Path>, | |
{ | |
match path { | |
None => Ok(Box::new(io::BufReader::new(io::stdin()))), | |
Some(path) => match fs::File::open(path) { | |
Ok(file) => Ok(Box::new(io::BufReader::new(file))), |
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
DIR_COLORS="$HOME/.dir_colors" | |
eval "`dircolors -b $DIR_COLORS`" |
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
# LS_COLORS | |
# Maintainers: Magnus Woldrich <[email protected]>, | |
# Ryan Delaney <[email protected]> | |
# URL: https://github.com/trapd00r/LS_COLORS | |
# | |
# This is a collection of extension:color mappings, suitable to use as your | |
# LS_COLORS environment variable. Most of them use the extended color map, | |
# described in the ECMA-48 document; in other words, you'll need a terminal | |
# with capabilities of displaying 256 colors. | |
# |
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 { RWLock, FileLock, withPermissions } from './rwlock'; | |
describe('Base RW Lock', () => { | |
enum LockTypes { | |
READ = 'read', | |
WRITE = 'write', | |
} | |
type TestCase = { | |
locks: LockTypes[]; |
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 logging | |
import typing as t | |
from textwrap import indent | |
from pretty_traceback.formatting import exc_to_traceback_str | |
_ansi_colors = { | |
"black": 30, | |
"red": 31, | |
"green": 32, |
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
#pragma once | |
#define RGB_MATRIX_KEYPRESSES | |
// some kind of raindrop effect caused board to crash | |
#define DISABLE_RGB_MATRIX_RAINDROPS | |
#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS | |
#define DISABLE_RGB_MATRIX_PIXEL_RAIN | |
#define DISABLE_RGB_MATRIX_PIXEL_FLOW | |
#define DISABLE_RGB_MATRIX_PIXEL_FRACTAL |