Skip to content

Instantly share code, notes, and snippets.

View iTonyYo's full-sized avatar
🎯
Focusing

Whoami iTonyYo

🎯
Focusing
  • California
View GitHub Profile
@iTonyYo
iTonyYo / javascript_engines_and_runtimes.md
Created February 26, 2024 01:14 — forked from guest271314/javascript_engines_and_runtimes.md
A list of JavaScript engines, runtimes, interpreters

V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.

SpiderMonkey is Mozilla’s JavaScript and WebAssembly Engine, used in Firefox, Servo and various other projects. It is written in C++, Rust and JavaScript. You can embed it into C++ and Rust projects, and it can be run as a stand-alone shell. It can also be [compiled](https://bytecodealliance.org/articles/making-javascript-run-fast-on

@iTonyYo
iTonyYo / xcframework.shell
Last active November 7, 2023 09:41
Create xcframework. create this file, and `chmod 755 xcframework.shell` make this file excutable.
#!/bin/bash
iosFrameworksDir="./build/Park.ios.xcarchive/Products/Library/Frameworks"
simulatorFrameworksDir="./build/Park.iphonesimulator.xcarchive/Products/Library/Frameworks"
outDir="./build"
outputSuffix="xcframework"
for iosFramework in "$iosFrameworksDir"/*
do
@iTonyYo
iTonyYo / README.md
Created September 18, 2023 05:57 — forked from kfox/README.md
TCP echo server for Node.js

TCP echo server for Node.js

Usage

  1. Make sure you have a modern-ish version of Node.js installed.
  2. Type npx https://gist.github.com/kfox/1280c2f0ee8324067dba15300e0f2fd3
  3. Connect to it from a client, e.g. netcat or similar: nc localhost 9000
$httpClient.get('https://api.my-ip.io/ip', function (error, response, data) {
$done({
title: '当前 IP 地址',
content: data,
backgroundColor: '#000000',
icon: 'network',
})
})
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
# if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
# source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
# fi
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="apple" # apple, robbyrussell, agnoster, bira, amuse
dev-rm-h5.szfiu.com
test-rm-h5.szfiu.com
uat-rm-h5.szfiu.com
dev-event.szfiu.com
test-event.szfiu.com
uat-event.szfiu.com
dev-h5-ui.szfiu.com
test-h5-ui.szfiu.com
uat-h5-ui.szfiu.com
import { type Plugin, type UserConfig } from 'vite';
export default function myPlugin(): Plugin {
return {
enforce: 'post',
apply: 'build',
name: 'blabla',
/*
{
"files.exclude": {
"**/.gitignore": false,
"**/.gitignorerc.json": false,
"**/package-lock.json": false,
"**/.vscode": false,
"**/dist": false,
"**/node_modules": false,
"**/pnpm-lock.yaml": false,
"**/storybook-static": false,
@iTonyYo
iTonyYo / activealiases.sh
Created August 23, 2022 08:15 — forked from virajkulkarni14/activealiases.sh
List of active aliases on Oh my zsh
-='cd -'
...=../..
....=../../..
.....=../../../..
......=../../../../..
1='cd -'
2='cd -2'
3='cd -3'
4='cd -4'
5='cd -5'
@iTonyYo
iTonyYo / variance.ts
Created August 3, 2022 10:33
显然,在期望父类型的地方使用对象类型是不安全的。
type ExistingUser = {
id: number
name: string
}
// WT 是 ExistingUser 的超类型
type WT = { id?: number, name: string }
// 这里是期望父类型的地方