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
| <templateSet group="Remix"> | |
| <template name="useFetcher" value="const $fetcher$ = useFetcher();" description="const fetcher = useFetcher()" toReformat="true" toShortenFQNames="true" useStaticImport="true"> | |
| <variable name="fetcher" expression="" defaultValue=""fetcher"" alwaysStopAt="true" /> | |
| <context> | |
| <option name="JS_CLASS_MEMBER_STATEMENT" value="false" /> | |
| <option name="JS_STATEMENT" value="true" /> | |
| <option name="TS_CLASS_MEMBER_STATEMENT" value="false" /> | |
| <option name="TS_STATEMENT" value="true" /> | |
| </context> | |
| </template> |
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
| public static class SemaphoreSlimExtensions | |
| { | |
| /// <summary> | |
| /// Blocks the current thread until it can enter the <see cref="SemaphoreSlim"/>. Returns an <see cref="IDisposable"/> to be used in <c>using</c>. | |
| /// </summary> | |
| /// <param name="semaphore">A <see cref="SemaphoreSlim"/> to lock.</param> | |
| /// <returns>An <see cref="IDisposable"/> that will release the <see cref="SemaphoreSlim"/> when disposed.</returns> | |
| public static IDisposable Lock(this SemaphoreSlim semaphore) | |
| { | |
| semaphore.Wait(); |
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
| /** | |
| * By default, Remix will handle generating the HTTP Response for you. | |
| * You are free to delete this file if you'd like to, but if you ever want it revealed again, you can run `npx remix reveal` ✨ | |
| * For more information, see https://remix.run/file-conventions/entry.server | |
| */ | |
| import type { AppLoadContext, EntryContext } from "@remix-run/cloudflare"; | |
| import { RemixServer } from "@remix-run/react"; | |
| import { isbot } from "isbot"; | |
| import { renderToReadableStream } from "react-dom/server"; |
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
| <# | |
| .SYNOPSIS | |
| Counts the lines of code in the specified directory using cloc. | |
| .DESCRIPTION | |
| This script utilizes the cloc (Count Lines of Code) tool to analyze and count the lines of code in a given directory. It requires Docker Desktop to be running, as cloc is executed within a Docker container. | |
| To improve performance, the script first compresses the files into a zip archive. This allows the Docker container to analyze the code quickly, avoiding the slow performance that would result from mounting all files as a volume. |
OlderNewer