- Homebrew should be installed (Command line tools for Xcode are included).
- Install
nvm
via Homebrew
.bar { | |
background-color: white; | |
width: 200px; | |
padding: 4px; | |
border-radius: 4px; | |
border: 2px solid; | |
overflow: hidden; | |
height: 20px; | |
} |
set dotenv-load | |
export RESTIC_REPOSITORY := 'E:\restic-repo' | |
# This retrieve the pw from bitwarden vault. | |
# bw cli needs bw login and bw session key set in .env before used. | |
export RESTIC_PASSWORD := `bw get password "restic repo"` | |
# Restic docs | |
# https://restic.readthedocs.io/en/stable/index.html |
#!/usr/bin/env -S deno run | |
import { sortBy } from "https://deno.land/std@0.186.0/collections/sort_by.ts"; | |
import { groupBy } from "https://deno.land/std@0.186.0/collections/group_by.ts"; | |
import { reduceGroups } from "https://deno.land/std@0.186.0/collections/reduce_groups.ts"; | |
import { plot } from "https://deno.land/x/chart@1.1/mod.ts"; | |
// Using JSON from this gh --json output | |
// gh pr list --json title,additions,deletions,changedFiles,author,number --search "uiv2 in:title" --state=all --limit 300 | |
type Pr = { |
function medianOfTwoSorted(sortedA: Array<number>, sortedB: Array<number>) { | |
let [m, n] = [sortedA.length, sortedB.length]; | |
if (m > n) { | |
// Use the longest array for m. | |
[sortedA, sortedB, m, n] = [sortedB, sortedA, n, m]; | |
} | |
if (n === 0) { | |
throw new Error('Array should not be empty'); |
nvm
via Homebrew{ | |
"jest": { | |
"preset": "jest-expo", | |
"transform": { | |
"^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js", | |
"^.+\\.tsx?$": "ts-jest" | |
}, | |
"testMatch": [ | |
"**/__tests__/**/*.ts?(x)", | |
"**/?(*.)+(spec|test).ts?(x)" |
{ | |
"defaultSeverity": "error", | |
"extends": [ | |
"tslint:recommended", | |
"tslint-react", | |
"tslint-plugin-prettier", | |
"tslint-config-prettier", | |
"tslint-config-kodefox" | |
], | |
"linterOptions": { |
{ | |
"extends": "./node_modules/tsconfig-kodefox/tsconfig", | |
"compilerOptions": { | |
"noEmit": true, | |
"lib": ["dom", "esnext"], | |
"jsx": "react-native", | |
"moduleResolution": "node", | |
"allowSyntheticDefaultImports": true, | |
"skipLibCheck": true, | |
"typeRoots": ["node_modules/@types", "custom_types"] |
{ | |
"workbench.startupEditor": "newUntitledFile", | |
"editor.multiCursorModifier": "alt", | |
"editor.formatOnSave": true, | |
"prettier.singleQuote": true, | |
"prettier.trailingComma": "all", | |
"prettier.bracketSpacing": false, | |
"prettier.arrowParens": "always", | |
"workbench.colorTheme": "SynthWave '84", | |
"editor.scrollBeyondLastLine": false, |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>getUniqueList</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |