Skip to content

Instantly share code, notes, and snippets.

View himself65's full-sized avatar

Alex Yang himself65

View GitHub Profile
const { MongoClient } = require('mongodb')
// Connection URL
const url = 'mongodb://localhost:27017'
const client = new MongoClient(url)
// Database Name
const dbName = 'myProject'
async function main () {
@himself65
himself65 / 1.txt
Created January 4, 2023 07:04
some words for the future
-----BEGIN PGP MESSAGE-----
Version: ObjectivePGP
Comment: https://www.objectivepgp.com
Charset: UTF-8
wcDMA7/6oVW1BzR+AQwAoPooOKyo2TKPj6ZLH4Orxfaxmx9N9V/Fc1RUydLIb58NL1qHnkx4x+Vv
4m9+8xKJhhJTrjT9QKsuD4YUn7oaszwcU8d7ctvK+ERrUvXC1l4B0gy6kRlP1sRBXcmPBH+e3c4q
25NlhxP8rp0q/VffWyZLl5yvb5yfjnxMifFFRPd64cdrfffFUM8D1qc3iSBKojRi1/a7R54IEwED
hag3INIRMl/F39Kved1MNBr5RqL5e4OBdUSTjnTo0mLrcddX6AK+iiQP2iLJOZR8uKDKK9GgYrtY
pZyutr5N9WK4JDE1hPeifU7VOp3MVAC8q0i7wMgKKTbvbsgGz3p89QLASAjizlwVcqFNmeINeE7D
@himself65
himself65 / CLA.md
Created February 15, 2023 23:42
BlockSuite CLA

BlockSuite Contributor License Agreement

To clarify the intellectual property license granted with contributions from any person or entity, BlockSuite must have on file a signed Contributor License Agreement ("CLA") from each contributor, indicating agreement with the license terms below. This agreement is for your protection as a contributor as well as the protection of the BlockSuite and its users; it does not change your rights to use your own contributions for any other purpose.

You accept and agree to the following terms and conditions for your past, present and future contributions submitted to BlockSuite. You should sign this agreement before submitting your first contribution. Except for the license granted herein to BlockSuite and recipients of software distributed by BlockSuite, You reserve all right, title, and interest in and to Your Contributions.

  1. Parties.

    (a) "BlockSuite" refers to the project's operator, TOEVERYTHING PTE. LTD registered in Republic of Singapore.

import * as React from 'react'
const mockA = new Map([
[
'react',
React
],
]);
const module = new StaticModuleRecord(`
@himself65
himself65 / index.ts
Created October 16, 2023 21:48
y-indexeddb example
import { setMergeCount } from '@toeverything/y-indexeddb'
// just for type check test
setMergeCount(1)
from llama_index.core import StorageContext
from llama_index.core import VectorStoreIndex
from llama_index.vector_stores.postgres import PGVectorStore
import openai
import os
openai.api_key = os.environ["OPENAI_API_KEY"]
from sqlalchemy import make_url