Skip to content

Instantly share code, notes, and snippets.

View aimuz's full-sized avatar
👀
I am actively seeking job opportunities in the field of cloud-native technologie

aimuz aimuz

👀
I am actively seeking job opportunities in the field of cloud-native technologie
View GitHub Profile
@aimuz
aimuz / fork-and-push.md
Created January 23, 2019 03:47 — forked from zxhfighter/fork-and-push.md
如何给开源项目贡献代码

如何给开源项目贡献代码

分两种情况:

  • 代码仓库管理者给你添加该仓库的写入权限,这样的话可以直接push
  • 如果不能直接push(大多数情况),采用经典的fork & pull request来提交代码,下面讲述这种情况

fork & pull request

例如有个仓库https://github.com/ecomfe/esui.git,其采用了经典的分支开发模型,稳定后的代码提交到master分支,其余特性则在dev分支上进行开发,待成熟后合并回master分支。

@aimuz
aimuz / deno_static_file_server.ts
Last active February 11, 2023 08:42 — forked from mayankchoubey/deno_static_file_server.ts
Deno static file server
import { serve } from "https://deno.land/std/http/mod.ts";
import { lookup } from "https://deno.land/x/media_types/mod.ts";
const BASE_PATH = "";
const reqHandler = async (req: Request) => {
const filePath = BASE_PATH + new URL(req.url).pathname;
let fileSize;
try {
fileSize = (await Deno.stat(filePath)).size;