Skip to content

Instantly share code, notes, and snippets.

View spd789562's full-sized avatar

Leo Lin spd789562

View GitHub Profile
@spd789562
spd789562 / 2023-09-06-FM.json
Last active February 11, 2024 06:29
TMS-Maplestory-Royal-Data
{
"type": "character",
"action": "stand1",
"emotion": "default",
"skin": 2000,
"zoom": 1,
"frame": 0,
"mercEars": false,
"illiumEars": false,
"selectedItems": {
@spd789562
spd789562 / node-webpmux-browser.js
Last active September 12, 2023 06:29
using node-webpmux in browser
import WebP from 'node-webpmux'; // remember put libwebp.wasm somewhere
import { Buffer } from 'buffer';
function createColorCanvasArrayBuffer(width: number, height: number, color: string) {
const canvas = document.createElement('canvas');
canvas.width = width;
canvas.height = height;
const ctx = canvas.getContext('2d')!;
ctx.fillStyle = color;
@spd789562
spd789562 / action.ts
Last active November 11, 2023 23:02
Maplestory.js with PIXI.js 7 AnimatedSprite
export enum CharacterAction {
Stand1 = 'stand1',
Walk1 = 'walk1',
Alert = 'alert',
}
@spd789562
spd789562 / GoogleSerpAPI.ts
Created April 20, 2023 10:45
Langchain tool for google search, is basicly just copy bingSerpAPI and change part of code useing google custom search
import { Tool } from 'langchain/tools';
import { google } from 'googleapis';
class GoogleSerpAPI extends Tool {
private apiKey: string;
private engineId: string;
private count = 5;
name = 'google-search';
description =
'a search engine. useful for when you need to answer questions about current events. input should be a search query.';
@spd789562
spd789562 / Download.ps1
Created September 16, 2022 03:57 — forked from kensleDev/Download.ps1
Dev terminal setup for Powershell
$powershellDir = "C:\Config\Powershell"
New-Item -ItemType Directory -Force -Path $powershellDir
cd $powershellDir
Invoke-WebRequest -Uri 'https://gist.githubusercontent.com/kensleDev/13f9290876e782b2e67aab8b463e55f7/raw/66cdc60aa61da8a88a480c14b5fe817beba7dab9/profile.ps1' -OutFile 'profile.ps1'
Invoke-WebRequest -Uri 'https://gist.githubusercontent.com/kensleDev/13f9290876e782b2e67aab8b463e55f7/raw/cda7a409a315bf767f830897b0b8f53611e11f1e/Install.ps1' -OutFile 'Install.ps1'
Invoke-WebRequest -Uri 'https://gist.githubusercontent.com/kensleDev/13f9290876e782b2e67aab8b463e55f7/raw/13c1f7eb8ffa50e385c3b960c76ded9389bdaf3e/takuya.omp.json' -OutFile 'takuya.omp.json'