Skip to content

Instantly share code, notes, and snippets.

View xiaotianxt's full-sized avatar
🎯
Focusing

Andy Tian xiaotianxt

🎯
Focusing
View GitHub Profile
@hanxiao
hanxiao / testRegex.js
Last active June 28, 2025 00:11
Regex for chunking by using all semantic cues
// Updated: Aug. 20, 2024
// Run: node testRegex.js whatever.txt
// Live demo: https://jina.ai/tokenizer
// LICENSE: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0)
// COPYRIGHT: Jina AI
const fs = require('fs');
const util = require('util');
// Define variables for magic numbers
const MAX_HEADING_LENGTH = 7;
@nielsmaerten
nielsmaerten / ! Mongo+TLS on Docker.md
Last active June 7, 2024 15:04
MongoDB + MongoExpress over TLS on Docker

Secure MongoDB on Docker (incl MongoExpress, Let's Encrypt)

This gist contains files and instructions to setup MongoDB on a simple docker host.
Connections to Mongo are secured using TLS, and the certificate is signed using Let's Encrypt.
MongoExpress is included as well, but should only be used over an SSH tunnel.

  1. Update .env

  2. Make sure docker-compose is available

Required on GCP Cloud Optimized OS