This file contains hidden or 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
.bar { | |
background-color: white; | |
width: 200px; | |
padding: 4px; | |
border-radius: 4px; | |
border: 2px solid; | |
overflow: hidden; | |
height: 20px; | |
} |
This file contains hidden or 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
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 |
This file contains hidden or 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 -S deno run | |
import { sortBy } from "https://deno.land/[email protected]/collections/sort_by.ts"; | |
import { groupBy } from "https://deno.land/[email protected]/collections/group_by.ts"; | |
import { reduceGroups } from "https://deno.land/[email protected]/collections/reduce_groups.ts"; | |
import { plot } from "https://deno.land/x/[email protected]/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 = { |
This file contains hidden or 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 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'); |
This file contains hidden or 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
{ | |
"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)" |
This file contains hidden or 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
{ | |
"defaultSeverity": "error", | |
"extends": [ | |
"tslint:recommended", | |
"tslint-react", | |
"tslint-plugin-prettier", | |
"tslint-config-prettier", | |
"tslint-config-kodefox" | |
], | |
"linterOptions": { |
This file contains hidden or 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
{ | |
"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"] |
This file contains hidden or 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
{ | |
"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, |
This file contains hidden or 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
<!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> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Math clamp</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> |
NewerOlder