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
[ | |
"Adaptive Tab Bar Colour", | |
"Add-ons Search Detection", | |
"BetterTTV", | |
"Bitwarden Password Manager", | |
"ClearURLs", | |
"Disable JavaScript", | |
"Facebook Container", | |
"Firefox Multi-Account Containers", | |
"Form Autofill", |
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
import fs from 'node:fs' | |
import { fileURLToPath } from 'node:url' | |
import path from 'node:path' | |
import pkg from '../packages.json' assert { type: 'json' } | |
const source = process.argv[2] || 'names.txt' | |
const names = fs.readFileSync(fileURLToPath(new URL(path.join('data', source), import.meta.url)), 'utf-8').split('\n') | |
const resumeFrom = process.argv[3] | |
let resumed = !resumeFrom |
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
rebase_or_merge () { | |
local branch=${1:-$(git config --get init.defaultBranch)} | |
local remote=${$(git remote | grep '^upstream$'):-origin} | |
git fetch $remote | |
git $CMD $remote/$branch | |
} | |
# Usage: merge <branch> | |
merge () { |
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
type Entries<T extends Readonly<Array<readonly [string, any]>>> = { | |
[Index in keyof T]: { [K in T[Index][0]]: T[Index][1] } | |
}[number] | |
type UnionToIntersection<U> = | |
(U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never | |
const fromEntries = <T extends Readonly<Array<readonly [string, any]>>>(entries: T): UnionToIntersection<Entries<T>> => | |
Object.fromEntries(entries) as any |
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
{ | |
"recommendations": [ | |
"aaron-bond.better-comments", | |
"adrieankhisbe.vscode-ndjson", | |
"johnsoncodehk.vscode-tsconfig-helper", | |
"rbuckton.deoptexplorer-vscode", | |
"helixquar.randomeverything", | |
"WallabyJs.quokka-vscode", | |
"bierner.comment-tagged-templates", | |
"alexcvzz.vscode-sqlite", |
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
// ~/.storybook/webpack.config.js | |
/* eslint-disable @typescript-eslint/no-var-requires */ | |
const path = require('path') | |
const webpackConfig = require('../test/webpack.config.nuxt') | |
/* eslint-enable */ | |
module.exports = ({ config }) => { | |
return { | |
...config, | |
resolve: { |
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
import Vue from 'vue' | |
import { | |
getCurrentInstance, | |
onServerPrefetch, | |
onBeforeMount, | |
} from '@vue/composition-api' | |
import { ComponentInstance } from '@vue/composition-api/dist/component' | |
import { normalizeError } from '@nuxt/vue-app' | |
interface Fetch { |
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
/* eslint-disable @typescript-eslint/no-var-requires */ | |
const { Nuxt, Builder } = require('nuxt') | |
const config = require('./nuxt.config') | |
/* eslint-enable */ | |
process.env.DEBUG = 'nuxt:*' | |
const nuxt = new Nuxt({ | |
...config, | |
dev: 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
import express from 'express' | |
const app = express() | |
app.use(express.json()) | |
app.post('/endpoint', function(req, res) { | |
try { | |
// Do stuff | |
res.status(200).end() | |
} catch (e) { |
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
import { CookieAttributes } from 'js-cookie' | |
interface StorageCookieOptions extends CookieAttributes { | |
cookie: { | |
prefix: string | |
options?: StorageCookieOptions | |
} | |
} | |
interface Storage { | |
setUniversal(key: string, value: any, isJson?: boolean): string |
NewerOlder