description: Backend engineering for APIs, authentication, billing, data access, and service reliability. Use for server-side work with meaningful logic or security impact. mode: subagent model: openrouter/z-ai/glm-5.2 textVerbosity: low temperature: 0.2 permission: read: allow edit: allow bash: allow
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
| // current timeout issue https://github.com/GoogleChrome/lighthouse-ci/issues/475 | |
| module.exports = { | |
| ci: { | |
| collect: { | |
| numberOfRuns: 1, | |
| isSinglePageApplication: true, | |
| settings: { | |
| chromeFlags: | |
| '--no-sandbox --disable-gpu --disable-dev-shm-usage --ignore-certificate-errors', | |
| disableStorageReset: true, |
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
| async function timeout(cb = () => {}, ms = 1000) { | |
| await new Promise((resolve, reject) => { | |
| let wait = setTimeout(() => { | |
| cb() | |
| clearTimeout(wait); | |
| }, ms); | |
| }); | |
| } |
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
| alefragnani.project-manager-12.5.0 | |
| arturock.gitstash-5.1.0 | |
| bradlc.vscode-tailwindcss-0.8.2 | |
| christian-kohler.path-intellisense-2.8.0 | |
| clemenspeters.format-json-1.0.2 | |
| codezombiech.gitignore-0.7.0 | |
| cssho.vscode-svgviewer-2.0.0 | |
| csstools.postcss-1.0.9 | |
| dbaeumer.vscode-eslint-2.2.2 | |
| dotjoshjohnson.xml-2.5.1 |
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 sh | |
| # find and return only sub-directory names | |
| find . -maxdepth 1 -type d -not -path '.' -printf "%f\n" | |
| # fast deletion 11 | |
| mkdir empty_dir | |
| rsync -a --delete empty_dir/ yourdirectory/ | |
| # fast deletion -2 |
// https://stackoverflow.com/questions/48884248/how-can-i-add-files-to-the-ios-simulator
go to ~/Library/Developer/CoreSimulator/Device
then ~/Library/Developer/CoreSimulator/Devices//data/Containers/Shared/AppGroup//File Provider Storage/
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
| // FilterPrefixedKeys<{ a1, b1 }, 'a'> == { a } | |
| export type FilterPrefixedKeys<T, S extends string> = T extends `${S}${infer _X}` ? T : never | |
| // https://stackoverflow.com/questions/69038001/remove-string-from-template-literal-types-in-typescript | |
| // GetPostPrefixSubstring<{ a1, b}, 'a'> == { 1 } | |
| export type GetPostPrefixSubstring<T, S extends string> = T extends `${S}${infer X}` ? X : never |
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 sh | |
| # get dangling commits | |
| git fsck --no-reflog \ | |
| | awk '/dangling commit/ {print $3}' \ | |
| | xargs -L 1 git --no-pager show -s --format="%ci %H" \ | |
| | sort | |
| # https://coderwall.com/p/euwpig/a-better-git-log | |
| # commits by author |
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 React from 'react'; | |
| import { IntlProvider, intlShape, injectIntl } from 'react-intl'; | |
| import { mount, shallow } from 'enzyme'; | |
| // You can pass your messages to the IntlProvider. Optional: remove if unneeded. | |
| const messages = { foo: 'bar'} // en.json | |
| const intlProps = { locale: 'en', messages }; | |
| const Child = () => null; | |
| const IntlChild = injectIntl(Child); |
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
| export default (source) => { | |
| source || return; | |
| const newScript = document.createElement("script"); | |
| newScript.async = true; | |
| newScript.src = source; | |
| const s0 = document.getElementsByTagName('script')[0]; | |
| s0.parentNode.insertBefore(newScript, s0); | |
| } |
NewerOlder