Skip to content

Instantly share code, notes, and snippets.

View mayneyao's full-sized avatar

Mayne mayneyao

View GitHub Profile
mayneyao /
Created September 18, 2023 20:02
eidos python sdk (wip)
import uuid
import requests
BASE_URL = "http://localhost:3333"
class DataSpace:
def __init__(self, space_id):
self.space_id = space_id
mayneyao / eidos-ext.js
Last active September 12, 2023 20:26
Extension Mechanism Implementation of Web App Based on Wildcard Domains, OPFS, and Worker Communication
* Welcome to Cloudflare Workers! This is your first worker.
* - Run "npm run dev" in your terminal to start a development server
* - Open a browser tab at http://localhost:8787/ to see your worker in action
* - Run "npm run deploy" to publish your worker
* Learn more at
mayneyao /
Created February 7, 2022 11:04
import os
import time
from vika import Vika
API_TOKEN = '你的 api token'
DST_ID = '存储图片的表id'
file_dir = '/Users/mayne/Desktop/demo' # 需要上图片的文件路径
vika = Vika(API_TOKEN)
openapi: 3.0.0
- url: //
description: Default server
- url: //
description: Sandbox server
description: |
This is a sample server Petstore server.
You can find out more about Swagger at
// 钉钉机器人 webhook 请求,在 figma 插件中存在跨域限制,这个 proxy 脚本可以解决这个问题。
// deno deploy 暂不支持私密仓库的部署,先使用公开的 gist。
async function handleRequest(request) {
// For making a POST request we need to specify the method property
// as POST and provide data to the body property in the same object.
// echoes data we POST to it.
const url = new URL(request.url);
const text = url.searchParams.get("text")
async function handleRequest(request) {
// We pass the url as the first argument to fetch and an object with
// additional info like headers, method, and body for POST requests as
// the second argument. By default fetch makes a GET request,
// so we can skip specifying method for GET requests.
const response = await fetch("", {
headers: {
// Servers use this header to decide on response body format.
// "application/json" implies that we accept the data in JSON format.
accept: "application/json",
mayneyao / notion2blog.js
Last active July 4, 2024 17:35 > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = ""
const START_PAGE = ""
const DISQUS_SHORTNAME = "agodrich"
addEventListener('fetch', event => {
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
mayneyao /
Created August 4, 2019 15:49 — forked from PurpleBooth/
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


mayneyao /
Created July 19, 2019 02:48
Python 中字典转对象演示
from types import SimpleNamespace
npc = {
'name': {
'first': 'san',
'last': 'zhang'
'hp': 1000
npc = SimpleNamespace(**npc)
mayneyao / github.bash
Created March 5, 2019 07:46 — forked from igrigorik/github.bash
Open GitHub URL for current directory/repo...
alias gh="open \`git remote -v | grep | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's/:/\//' -e 's/git@/http:\/\//'\`"