Skip to content

Instantly share code, notes, and snippets.

View imWildCat's full-sized avatar

Mike Chong imWildCat

  • True North
  • 08:17 (UTC -06:00)
View GitHub Profile
@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 🤖
@imWildCat
imWildCat / chatgpt-4.md
Last active March 19, 2023 21:46
GPT-4: Converting Xcodegen yaml to Bazel demo

Convert this project.yml (XcodeGen) to Bazel build files:

name: Project
include: [environments.yml, AnotherProject/project.yml]
options:
  bundleIdPrefix: com.project
  usesTabs: false
  indentWidth: 2
  tabWidth: 2
@imWildCat
imWildCat / wireguard_setup_2023.md
Last active November 23, 2022 03:40
Set up site-to-site Wireguard (2023 version)