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
eval "$(oh-my-posh init zsh --config ~/.poshthemes/colin.omp.json)" | |
enable_poshtooltips |
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
mod smallstring { | |
use std::{ | |
fmt, | |
ops::{Deref, DerefMut}, | |
}; | |
use diesel::{backend::Backend, types::FromSql}; | |
use serde::{Deserialize, Serialize}; | |
use smallstr::SmallString as ExtSmallString; |
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 binarySearch<T>(arr: T[], entry: T, compare: (l: T, r: T) => number): number { | |
let mid: number = 0, | |
l: number = 0, | |
r: number = arr.length - 1, | |
e: T; | |
while (l <= r) { | |
mid = Math.floor((l + r) / 2); | |
if ((e = arr[mid]!) === entry) | |
return mid; |
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
/** | |
* Based on [@codemirror/rectangular-selection](https://github.com/codemirror/rectangular-selection) | |
* This is a clean implementation made possible by [this commit] | |
* [this commit]: https://github.com/codemirror/view/commit/6ec0d746ff3a33e3f73870fa7527779ec7af9904 | |
* @license MIT | |
*/ | |
import { Extension, EditorSelection, EditorState, SelectionRange, Facet, Compartment } from "@codemirror/state"; | |
import { EditorView, MouseSelectionStyle, PluginValue, ViewPlugin, ViewUpdate } from "@codemirror/view"; | |
import { countColumn, findColumn } from "@codemirror/text"; |