Skip to content

Instantly share code, notes, and snippets.

View Sonic853's full-sized avatar
👴
: Work Give 👴 Climb 👉

853 Sonic853

👴
: Work Give 👴 Climb 👉
View GitHub Profile
@Sonic853
Sonic853 / Vditor.vue
Last active April 13, 2023 07:32
基于 vue Component 组建的 Vditor
<script setup lang="ts">
import { onMounted, ref, watch, toRaw, computed, defineComponent, h, Ref } from 'vue'
import type { PropType } from 'vue'
import "vditor/dist/index.css"
import Vditor from "vditor"
const simpleConfig = [
'emoji',
'headings',
'bold',
'italic',
@Sonic853
Sonic853 / httpproxy.js
Created July 14, 2022 09:30
proxy http request and edit resources
import http from 'http';
const sourceHost = 'localhost'
const sourcePort = 3001
const sourceURL = `${sourceHost}:${sourcePort}`
const proxyHost = 'localhost'
const proxyPort = 3008
const proxyURL = `${proxyHost}:${proxyPort}`
let server = http.createServer((req, res) => {
console.log(req.url)
// 从3001端口获取数据
@Sonic853
Sonic853 / PackageImporter.cs
Created July 6, 2022 02:31
AssetDatabase.ImportPackage with async
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEditor;
using UnityEngine;
public class PackageImporter
{
public static async Task ImportPackageAsync(string packagePath)
@Sonic853
Sonic853 / bash
Created May 27, 2021 03:36
在 EpicGames 组织设置你为公开
curl -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ghp_Cnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnm" -H "Content-Length: 0" -X PUT https://api.github.com/orgs/EpicGames/public_members/Sonic853
@Sonic853
Sonic853 / CanvasToBlobAsync.js
Last active April 1, 2021 05:38
使用异步获取Canvas的Blob
/**
* 使用异步获取Canvas的Blob
* @param {string} type
* @param {Number} quality
* @returns {Promise<Blob>}
*/
HTMLCanvasElement.prototype.toBlobAsync = async function (type, quality) {
return new Promise((resolve, reject) => {
this.toBlob(blob => {
resolve(blob)
@Sonic853
Sonic853 / httpListener.ps1
Last active January 6, 2021 02:18
Simple web server built with PowerShell.
# This is a super **SIMPLE** example of how to create a very basic powershell webserver
# 2019-05-18 UPDATE — Created by @19WAS85 and and evalued by @jakobii and the comunity.
# 2021-01-05 UPDATE — Edited by @Sonic853.
param(
$ip = "localhost",
$Port = 8080,
$parentPath = [IO.Path]::Combine([IO.Path]::GetDirectoryName($MyInvocation.MyCommand.Path), "web")
)
# Http Server
$http = [System.Net.HttpListener]::new()
@Sonic853
Sonic853 / LinkList.cs
Last active November 18, 2019 06:49
Unity用的双向链表
@Sonic853
Sonic853 / index.html
Created January 17, 2019 11:41
HTML5 Default Template
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="css/style.css">
<script></script>
</head>
<body>

Keybase proof

I hereby claim:

  • I am Sonic853 on github.
  • I am sonic853 (https://keybase.io/sonic853) on keybase.
  • I have a public key whose fingerprint is 7464 A375 7B18 7161 E950 1B6A CA77 F84E 3ECA 6CCF

To claim this, I am signing this object: