Skip to content

Instantly share code, notes, and snippets.

View ashhitch's full-sized avatar
💭
Slinging Divs

Ash Hitchcock ashhitch

💭
Slinging Divs
View GitHub Profile

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"
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.macos` has finished
while true; do
sudo -n true
sleep 60
kill -0 "$$" || exit
@CesarBenavides777
CesarBenavides777 / gatsby-config.js
Created January 13, 2022 16:53
Caching on gatsby cloud in gatsby-config.js
{
resolve: `gatsby-plugin-gatsby-cloud`, // `gatsby-plugin-gatsby-cloud`
options: {
allPageHeaders: [
'Strict-Transport-Security: max-age=31536000; includeSubDomains; preload',
],
headers: {
'/*': ['Cache-Control: public, max-age=31536000, immutable'],
'static/*': ['Cache-Control: public, max-age=31536000, immutable'],
},
@CesarBenavides777
CesarBenavides777 / gatsby-browser.js
Last active February 22, 2022 15:52
Example google tag gatsby-browser
// export const onInitialClientRender = () => {
// // wait to init GTM until after React has hydrated in this lifecycle
// const dataLayer = window.dataLayer || []
// dataLayer.push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' })
// }
function initGTM() {
if (window.isGTMLoaded) {
return false
}
@CesarBenavides777
CesarBenavides777 / gatsby-ssr.js
Last active February 22, 2022 15:52
Example ssr file
import React from 'react'
export const onRenderBody = ({ setHeadComponents }) => {
setHeadComponents([
<link
rel="preconnect"
key="dns-prefetch-google-tag-manager"
href="https://www.googletagmanager.com"
as="script"
/>,
@jadenlemmon
jadenlemmon / index.js
Created November 1, 2021 17:55
Example A/B Test Gatsby v4 SSR Cookies
import { sample } from 'lodash';
import React from 'react';
import cookie from 'cookie';
import Layout from '../components/layout';
import HomeV1 from '../components/scenes/home/v1';
import HomeV2 from '../components/scenes/home/v2';
const EXPERIMENT_OPTIONS = {
v1: HomeV1,
v2: HomeV2,
@DiesIrae
DiesIrae / cascadeDelete.ts
Last active July 15, 2025 04:33
Abstract Cascade Delete Hook for Keystone 6
// "@keystone-next/types": "^22.0.0",
// "@keystone-next/keystone": "^22.0.0"
// The actual lib
// utils/keystone/cascadeDelete.ts
import { ListHooks } from "@keystone-next/types"
import { BaseGeneratedListTypes } from "@keystone-next/types/src/utils"
type BeforeDeleteType = Exclude<
ListHooks<BaseGeneratedListTypes>["beforeDelete"],
#!/bin/bash
# This script will download the contents of a GitHub repo
# and place them in a local directory.
#
# Usage:
# download-repo.sh <repo> <output-path> <nested-path> <branch-name>
#
# Example:
# download-repo.sh wattenberger/kumiko ./kumiko-assets master public/assets
import React from "react";
import styled from "styled-components";
import { storiesOf } from "@storybook/react";
import { text, withKnobs } from "@storybook/addon-knobs";
import { mobileViewport, addFullWidthWrapperDecorator } from "../utils";
import { Instagram } from "../../src/components/shared/Instagram";
/** Important pieces here. Images located in ../static/ */
import Instagram1 from "gatsby-image-fluid!../static/instagram_1.jpg";
@horacioh
horacioh / gatsby-config.js
Created November 20, 2019 21:59
Gatsby config: PostCSS, Tailwind, Emotion, Prismic, Google Analytics, Manifest & Offline
/* eslint-disable jsx-a11y/rule-name */
const path = require("path")
require("dotenv").config({
path: `../.env.${process.env.NODE_ENV}`,
})
module.exports = {
siteMetadata: {