// 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/
| #!/usr/bin/env bash | |
| kubectl apply -f cp-helm-charts/examples/kafka-client.yaml | |
| kubectl exec -it kafka-client -- /bin/bash | |
| ## Setup | |
| export RELEASE_NAME=my-confluent-oss | |
| export ZOOKEEPERS=${RELEASE_NAME}-cp-zookeeper:2181 | |
| export KAFKAS=${RELEASE_NAME}-cp-kafka-headless:9092 | |
| ## Create Topic | |
| kafka-topics --zookeeper $ZOOKEEPERS --create --topic test-rep-one --partitions 6 --replication-factor 1 |
| 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); | |
| } |
| 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); |
| #!/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 |
| // 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 |
// 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/
| #!/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 |
| 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 |
| async function timeout(cb = () => {}, ms = 1000) { | |
| await new Promise((resolve, reject) => { | |
| let wait = setTimeout(() => { | |
| cb() | |
| clearTimeout(wait); | |
| }, ms); | |
| }); | |
| } |
| // 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, |