Skip to content

Instantly share code, notes, and snippets.

View imWildCat's full-sized avatar

Mike Chong imWildCat

  • True North
  • 10:28 (UTC -07:00)
View GitHub Profile
@imWildCat
imWildCat / kamal-2-json-schema.json
Last active September 26, 2024 21:44
Kamal 2 JSON Schema for Humans
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Kamal 2.0 Config",
"description": "Configuration schema for Kamal 2.0 deployment tool.",
"type": "object",
"properties": {
"service": {
"type": "string",
"description": "Name of your application. Used to uniquely configure containers."
},
@imWildCat
imWildCat / meta-prompt.txt
Last active August 26, 2024 22:45
Meta prompt shared by @shaoruu for Cursor.com
DO NOT GIVE ME HIGH LEVEL SHIT, IF I ASK FOR FIX OR EXPLANATION, I WANT ACTUAL CODE OR EXPLANATION!!! I DON'T WANT "Here's how you can blablabla"
- Be casual unless otherwise specified
- Be terse
- Suggest solutions that I didn’t think about—anticipate my needs
- Treat me as an expert
- Be accurate and thorough
- Give the answer immediately. Provide detailed explanations and restate my query in your own words if necessary after giving the answer
- Value good arguments over authorities, the source is irrelevant
- Consider new technologies and contrarian ideas, not just the conventional wisdom
@imWildCat
imWildCat / err.txt
Created July 10, 2024 19:53
tamagui.dev error
[Error] Failed to load resource: the server responded with a status of 401 (Unauthorized) (user, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (docs_components_stacks_vxrn_loader.js, line 0)
[Error] Unhandled Promise Rejection: TypeError: Importing a module script failed.
(anonymous function) (_virtual_vxs-entry-EZZ-1xld.js:89:8520)
[Error] Unhandled Promise Rejection: SyntaxError: Unexpected identifier 'No'. Expected '}' to end an object literal.
(anonymous function) (_virtual_vxs-entry-EZZ-1xld.js:89:8520)
[Error] Error loading loader – SyntaxError: Unexpected identifier 'No'. Expected '}' to end an object literal.
SyntaxError: Unexpected identifier 'No'. Expected '}' to end an object literal.
(anonymous function) (useLoader-DFumXRAL.js:1:623)
[Error] RootErrorBoundary.error – SyntaxError: Unexpected identifier 'No'. Expected '}' to end an object literal.
compose_release() {
curl --silent "https://api.github.com/repos/docker/compose/releases/latest" |
grep -Po '"tag_name": "\K.*?(?=")'
}
if ! [ -x "$(command -v docker-compose)" ]; then
sudo curl -L https://github.com/docker/compose/releases/download/$(compose_release)/docker-compose-$(uname -s)-$(uname -m) \
-o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose
fi
@imWildCat
imWildCat / unstar_swift_repos.cts
Created December 13, 2023 19:46
Unstar old Swift repos (no update for one year and less than 1k stars)
import axios from 'axios';
const GITHUB_TOKEN = 'xxx';
const GITHUB_USERNAME = 'xxx';
axios.defaults.headers.common['Authorization'] = `token ${GITHUB_TOKEN}`;
const unstarRepo = async (repoFullName: string) => {
try {
await axios.delete(`https://api.github.com/user/starred/${repoFullName}`);
from langchain.llms.base import LLM
from typing import Optional, List
from revChatGPT.V1 import Chatbot
class revChatGPT(LLM):
chatbot: Chatbot = Chatbot(config={
"access_token": "<your token here>"
})
@imWildCat
imWildCat / repo-rinse.sh
Created August 3, 2023 22:55 — forked from nicktoumpelis/repo-rinse.sh
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
@imWildCat
imWildCat / user_script.js
Last active June 27, 2023 03:23
Fava checkmarks
for (const d of document.querySelectorAll('.change.num')) {
const c = document.createElement('input');
c.type = 'checkbox';
d.insertBefore(c, d.lastElementChild);
}
// credit: @upsuper
@imWildCat
imWildCat / reboot_to_windows.sh
Created March 25, 2023 14:55
Ubuntu 22.04: Reboot to Windows
# https://unix.stackexchange.com/a/112284
reboot_to_windows ()
{
windows_title=$(grep -i windows /boot/grub/grub.cfg | cut -d "'" -f 2)
sudo grub-reboot "$windows_title" && sudo reboot
}
alias reboot-to-windows='reboot_to_windows'
@imWildCat
imWildCat / safar_debug_simulator.applescript
Last active March 20, 2023 00:42
Open Safari and Debug Simulator (generated by GPT-4, refined by @imWildCat)
#!/usr/bin/osascript
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Safari Dev or Simulator Debug (web)
# @raycast.mode compact
# Optional parameters:
# @raycast.icon 🤖