- Install homebrew from https://brew.sh/ (follow the instructions there)
- tap the https://invent.kde.org/packaging/homebrew-kde/ repo,
brew tap kde-mac/kde https://invent.kde.org/packaging/homebrew-kde.git
brew edit okular
, workaround now is to comment out or delete the linedepends_on "chmlib"
(won't compile on macos arm64 for now as of 2021-08-18), then save (if using vim you need to first pressi
to insert/type, when saving then<esc>
then:wq
then<enter>
.brew install okular
, wait for stuff to compile and/or install- It may ask for keychain credentials (to sign the binaries? because of mac arm64 security policy https://eclecticlight.co/2021/01/26/when-you-dont-have-permission-to-run-an-app-on-an-m1-mac/)
$(brew --repo kde-mac/kde)/tools/do-caveats.sh
- Now okular is in your
$HOME/Applications/KDE
folder, and will show up in Launchpad! You can view pdf, djvu, etc documents.
// RUN with a recent node.js version, using "node gen-types.mjs" | |
// DEPENDS on typescript and ts-morph | |
import { Project } from "ts-morph"; | |
import { writeFileSync } from "fs"; | |
const project = new Project({ | |
tsConfigFilePath: "tsconfig.json", | |
}); |
Here is how to add Cypress E2E tests to a Create React App bootstrapped application. Assumes the *nix command line, you may need to adapt this for a Windows command line (or use WSL or Git Bash).
-
Install Cypress and the Testing Library utilities for it (to match the helpers CRA installs):
$ npm i {,@testing-library/}cypress
i
is short for install, and the braces{}
are expanded by brace expansion tocypress @testing-library/cypress
.
#!/usr/bin/env bash | |
set -e | |
# we are going to setup different GitHub Actions workflows on | |
# GitHub repo '${repoName}' under GitHub user account '${userName}' | |
# which has Write access to the repo | |
# to trigger 'webhook' event with help of 'curl' command we use | |
# 'Authorization' header with personal access token '${token}' which | |
# has to be created aforehand, see [2] |
import { Document, Model, model, Types, Schema, Query } from "mongoose" | |
import { Company } from "./Company" | |
// Schema | |
const UserSchema = Schema<UserDocument, UserModel>({ | |
firstName: { | |
type: String, | |
required: true | |
}, | |
lastName: String, |
function ProviderComposer({ contexts, children }) { | |
return contexts.reduceRight( | |
(kids, parent) => | |
React.cloneElement(parent, { | |
children: kids, | |
}), | |
children | |
); | |
} |
See how a minor change to your commit message style can make a difference.
Tip
Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs
React recently introduced an experimental profiler API. This page gives instructions on how to use this API in a production release of your app.
Table of Contents
React DOM automatically supports profiling in development mode for v16.5+, but since profiling adds some small additional overhead it is opt-in for production mode. This gist explains how to opt-in.
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 12, | |
// font family with optional fallbacks | |
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace', | |
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) | |
cursorColor: 'rgba(248,28,229,0.8)', |