Skip to content

Instantly share code, notes, and snippets.

Beast Mode

Beast Mode is a custom chat mode for VS Code agent that adds an opinionated workflow to the agent, including use of a todo list, extensive internet research capabilities, planning, tool usage instructions and more. Designed to be used with 4.1, although it will work with any model.

Below you will find the Beast Mode prompt in various versions - starting with the most recent - 3.1

Installation Instructions

  • Go to the "agent" dropdown in VS Code chat sidebar and select "Configure Modes".
  • Select "Create new custom chat mode file"
@LanceMcCarthy
LanceMcCarthy / README.md
Last active May 7, 2025 19:25
VS Live Episode: Resources for Publishing .NET MAUI Projects

.NET MAUI Publishing Resources

So you're done building your .NET MAUI application, congrats! Now it's time to publish them, This can be a tricky topic to navigate, even to dedicated DevOps engineers who do this regularly because of the number of moving pieces in the puzzle.

To help you, I have combined several resources that are a great place to get started. These are not only a good Getting Started experience, but it's also a good thing to bookmark as a quick look-up reference.

Table of Contents

@gaearon
gaearon / 00-README-NEXT-SPA.md
Last active October 14, 2025 04:17
Next.js SPA example with dynamic client-only routing and static hosting

Next.js client-only SPA example

Made this example to show how to use Next.js router for a 100% SPA (no JS server) app.

You use Next.js router like normally, but don't define getStaticProps and such. Instead you do client-only fetching with swr, react-query, or similar methods.

You can generate HTML fallback for the page if there's something meaningful to show before you "know" the params. (Remember, HTML is static, so it can't respond to dynamic query. But it can be different per route.)

Don't like Next? Here's how to do the same in Gatsby.

// TODO: make `pages` optional and measure the div when unspecified, this will
// allow more normal document flow and make it easier to do both mobile and
// desktop.
import {
createContext,
useCallback,
useContext,
useEffect,
useMemo,
useRef,
<body>
<style>
.number {
color:purple;
}
.keyword {
color:blue;
}
.string {
color:red;
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@sindresorhus
sindresorhus / esm-package.md
Last active October 18, 2025 15:59
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@qmdx00
qmdx00 / powershell_proxy
Created April 18, 2020 04:19
windows powershell proxy config
# file path:
# ~\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
function Set-Proxy
{
$proxy = 'http://127.0.0.1:1086'
# temporary
$env:HTTP_PROXY = $proxy
$env:HTTPS_PROXY = $proxy
import PropTypes from 'prop-types';
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
type Defined<T> = T extends undefined ? never : T;
/**
* Get the type that represents the props with the defaultProps included.
*
* Alternatively, we could have done something like this:
@win5do
win5do / CompressImg.js
Last active April 8, 2021 02:29
利用cavans实现前端图片压缩
export default class CompressImg {
options = {
files: [], // 文件列表
maxSize: 500 * 1024, // 压缩限度
quality: 0.6, // 质量
}
constructor(options) {
this.options = options;
}