This is a simple background script to kill git-credential-manager when it hits the 100% cpu bug
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 { | |
Collection, | |
Database, | |
ReplicaSet, | |
Shard, | |
ShellInstanceState, | |
} from '@mongosh/shell-api'; | |
import { ShellApiClass } from '@mongosh/shell-api/lib/decorators'; | |
type ShellApi = ShellInstanceState['shellApi']; |
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 node | |
/* | |
Example usage: | |
``` | |
node markdown-it-with-pandoc.js ./README.md --enable-checkboxes --github-css -- -o README.html | |
``` | |
*/ | |
// Lint with xo --space --no-semicolon --no-esnext |
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
Show hidden characters
{ | |
"editor.semanticTokenColorCustomizations": { | |
"rules": { | |
"*.mutable": { | |
"fontStyle": "bold" | |
}, | |
"*.typeHint": { | |
"fontStyle": "italic" | |
}, | |
"interface": { |
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
{ | |
"customizeUI.font.monospace": "FantasqueSansMono Nerd Font", | |
"customizeUI.font.regular": "SF Pro Display", | |
"customizeUI.fontSizeMap": { | |
"13px": "12px" | |
}, | |
"customizeUI.stylesheet": { | |
".mac, .windows, .linux": "letter-spacing: -0.02rem", | |
".mac.trongthanh-theme-boxythemekit-themes-Boxy-Yesterday-json": "-webkit-text-stroke: 0.3px", | |
".minimap": "opacity: 0.5", |
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
## brew install pyenv pyenv-virtualenv | |
## pyenv install 3.8.13 | |
layout pyenv 3.8.13 |
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
interface AdvisoryReport { | |
id: number; | |
url: string; | |
title: string; | |
severity: string; | |
vulnerable_versions: string; | |
cwd: string[]; | |
cvss: { | |
score: number; |
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
javascript:(()=>{"function"==typeof window.__themeListenerUnsubscribe&&(window.__themeListenerUnsubscribe(),window.__themeListenerUnsubscribe=void 0);const e=window.matchMedia("(prefers-color-scheme: dark)"),t=async e=>{/255/.test(getComputedStyle(document.querySelector("#gbwa path")).getPropertyValue("color"))!==e.matches&&(async e=>{const t=e=>new Promise((t=>setTimeout(t,e)));var c=`[bgid="basic${e}"]:not(.a7J)`,o='[aria-label="Theme"] + button',n=document.querySelector(c),r=!n;if(!n){var i=document.querySelector(o);i||(document.querySelector('[data-tooltip="Settings"]').click(),await t(10),i=document.querySelector(o)),i.click(),await t(250),n=document.querySelector(c)}n.click(),r&&(await t(50),document.querySelector('[data-tooltip="Save & close"]').click())})(e.matches?"black":"white")};e.addEventListener("change",t),window.__themeListenerUnsubscribe=()=>{e.removeEventListener("change",t)}})() |
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
export const partition = <T>( | |
arr: T[], | |
iteratee: (value: T, index: number, array: T[]) => any | |
) => | |
arr.reduce( | |
(result: [T[], T[]], value, index, array) => ( | |
result[+!iteratee(value, index, array)].push(value), result | |
), | |
[[], []] | |
) |
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
type ValueOf<T> = T[keyof T]; | |
export const literalToEnum = <Enum extends Record<string, string | number>>( | |
// eslint-disable-next-line @typescript-eslint/no-unused-vars | |
enumButJustForTyping: Enum | |
) => <Candidate extends EnumLiteralType<Enum>>(v: Candidate) => | |
(v as string) as LiteralToEnum<Enum, Candidate>; | |
export type LiteralToEnum< | |
Enum extends Record<string, string | number>, |