Skip to content

Instantly share code, notes, and snippets.

View EastSun5566's full-sized avatar
🤔
Hmm

Michael Wang 汪東陽 EastSun5566

🤔
Hmm
View GitHub Profile
@Yukaii
Yukaii / README.md
Last active June 28, 2024 14:02
Editor font & codeblock font cutomization for HackMD
@sindresorhus
sindresorhus / esm-package.md
Last active July 22, 2025 07:24
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.
@lmiller1990
lmiller1990 / index.html
Created April 15, 2021 15:36
Vanilla FLIP Sundae
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
</head>
<body class="m-4">
<button class="bg-gray-300 my-2 px-4 py-2 rounded-md" onclick="flip()">Flip</button>

How to install game-porting-toolkit (aka proton for macOS)

You also might wanna just use Whisky which does this automatically

This guide works on macOS 13.4+ using Command Line Tools for XCode 15 Beta!

What is this?

In the recent WWDC, Apple announced and released the "game porting toolkit", which upon further inspection this is just a modified version of CrossOver's fork of wine which is a "compatibility layer" that allows you to run Windows applications on macOS and Linux.

@OrionReed
OrionReed / dom3d.js
Last active June 27, 2025 05:23
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@Yukaii
Yukaii / README.md
Last active February 14, 2025 17:06
Automated script for launching and retrying Oracle Cloud's Always-Free Tier instance with logging functionality

Script to Launch Always-Free Tier Machine on Oracle Cloud

The instance resource is often at full capacity. Therefore, we should create a script to automatically retry launching the instance at regular intervals.

The script also includes basic logging and will stop launching once you have successfully launched the instance.

Prerequisites

  • jq
  • oci (with correct setup)
@stanley2058
stanley2058 / ui-class-debugger.user.js
Last active June 20, 2025 06:39
Highlight all `ui-` class on a web page
// ==UserScript==
// @name HackMD `ui-` classes highlighter
// @namespace http://hackmd.io/
// @version 0.1.2
// @description Show all `ui-` classes
// @author stanley2058, Yukaii
// @match https://hackmd.io/*
// @match https://local.localhost/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=hackmd.io
// @grant GM.getValue

Beast Mode v3

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.

Installation Instructions

  • Go to the "agent" dropdown in VS Code chat sidebar and select "Configure Modes".
  • Select "Create new custom chat mode file"
  • Select "User Data Folder"
  • Give it a name (Beast Mode)