Install the package globally to make the chrome-devtools command available. You only need to do this the first time you use it.
npm i chrome-devtools-mcp@latest -g
chrome-devtools status # check if install worked.| #!/usr/bin/env bash | |
| set -euo pipefail | |
| CONFIG_FILE="/usr/local/etc/xray/config.json" | |
| SERVICE_NAME="xray" | |
| # STRING MANIPULATION for HOST/REMARKS | |
| RAW_HOSTNAME=$(hostname) | |
| HOST="$RAW_HOSTNAME" # Change this to host's public domain | |
| REMARKS="$RAW_HOSTNAME" |
| # Fava for Apple container | |
| # | |
| # Usage: | |
| # | |
| # 1. Build the image: | |
| # ``` | |
| # container build --tag fava --file fava.dockerfile . | |
| # ``` | |
| # | |
| # 2. Run the container: |
| /* Download Bright Horizons Photos */ | |
| import fs from "node:fs"; | |
| import https from "node:https"; | |
| import path from "node:path"; | |
| import process from "node:process"; | |
| import url from "node:url"; | |
| import util from "node:util"; | |
| if (!process.argv[2]) { |
| <html> | |
| <head> | |
| <script src="open-graph-metadata.js"></script> | |
| </head> | |
| <body>Index file.</body> | |
| </html> |
| function useStatePromise<S>(initialValue: S): [S, (promise: Promise<S>) => Promise<void>] { | |
| const [state, setState] = React.useState<S>(initialValue); | |
| const asyncCount: React.MutableRefObject<number> = React.useRef(0); | |
| async function setStatePromise(nextValuePromise: Promise<S>): Promise<void> { | |
| const currCount: number = ++asyncCount.current; | |
| const nextValue: S = await nextValuePromise; | |
| if (currCount === asyncCount.current) { | |
| setState(nextValue); | |
| } |
Minimal Visual Studio Support on .Net Core
| # | |
| # container-insights | |
| # | |
| # Send the docker container status to Azure Application Insight on every minute. | |
| # | |
| # Run it: | |
| # docker run -d --privileged --restart always \ | |
| # -v /var/run/docker.sock:/var/run/docker.sock \ | |
| # -e IKEY=12345678-1234-1234-1234-1234567890xx \ | |
| # -e PREFIX=docker-01 \ |
| import performanceNow = require('performance-now'); | |
| console.log(); | |
| console.log('# What is yield?'); | |
| console.log(); | |
| console.log(); | |
| console.log('## Return Array'); | |
| console.log(); |
| /** @file App.tsx */ | |
| class App extends React.PureComponent { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| mount: true | |
| }; | |
| } |