Skip to content

Instantly share code, notes, and snippets.

View faywong's full-sized avatar
💭
coding...

faywong faywong

💭
coding...
View GitHub Profile
@faywong
faywong / Dockerfile
Created May 20, 2024 01:30
docker file for milvus-lite maca version
# 前置条件: cp -rf /opt/maca .; cp -rf test_milvus .; cp milvus-2.3.13-py3-none-manylinux2014_x86_64.whl .
FROM ubuntu:20.04
# 将本地的 milvus-2.3.13-py3-none-manylinux2014_x86_64.whl 文件复制到镜像的 /tmp/ 目录下
COPY milvus-2.3.13-py3-none-manylinux2014_x86_64.whl /tmp/
COPY example.py /tmp/
COPY test_milvus /tmp/test_milvus
RUN mkdir -p /opt
COPY maca /opt/maca
# 创建一个新用户并将其添加到video组中
@faywong
faywong / Dockerfile
Last active May 6, 2024 15:37
android ci docker
# docker buildx build . -t sid/android_ci
# docker push registry.gitlab.com/szndev/ci-droid
FROM --platform=linux/amd64 openjdk:17-slim
ENV ANDROID_SDK_TOOLS 9477386
ENV ANDROID_SDK_URL https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_TOOLS}_latest.zip
ENV ANDROID_BUILD_TOOLS_VERSION 33.0.0
ENV NDK_VERSION 25.2.9519653
ENV ANDROID_HOME /usr/local/android-sdk-linux
ENV ANDROID_VERSION 33
@faywong
faywong / howto_write_cpp_on_ohos.md
Created March 26, 2024 11:27
华为鸿蒙上如何使用 vim + coc.nvim 写 c++ 代码

export OHOS_SDK=/Users/faywong/Library/Huawei/Sdk/HarmonyOS-NEXT-DP1 cmake -DOHOS_STL=c++_shared -DOHOS_ARCH=armeabi-v7a -DOHOS_PLATFORM=OHOS -DCMAKE_TOOLCHAIN_FILE=${OHOS_SDK}/base/native/build/cmake/ohos.toolchain.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1

@faywong
faywong / rime_ime_work_flow.md
Last active May 20, 2024 03:21
rime IME 流程简析

抱歉,本文在 Gentoo Linux Rime 输入法下写成,由于缺乏敏捷的截图工具,本文图片较少(UML 图后期再补)。请将就读完。

基础

术语

  • schema -> 输入法方案,比如 朙月拼音、倉頡五代,其 schema id 分别为:luna_pinyin、cangjie5

  • compose -> 选词组句

@faywong
faywong / lua_as_bash.md
Last active August 23, 2021 09:00
用 Lua 来代替 Bash.md
  • environment setup

amalg - merge several lua scripts into standalone one net-url - url parser luash - invoke sh commands from lua

brew install --use-clang luarocks
luarocks install --server=http://luarocks.org/dev amalg net-url luash
@faywong
faywong / how_to_renew_clione_eap.sh
Last active April 24, 2024 17:54
How to renew clion EAP
# CLion EAP: https://www.jetbrains.com/clion/nextversion/
# ref: https://stackoverflow.com/questions/26584948/how-do-i-remove-my-intellij-license-in-2019-3
rm -rf Library/Application Support/JetBrains/CLion*
#!/bin/bash -e
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Script to install everything needed to build chromium (well, ideally, anyway)
# See https://chromium.googlesource.com/chromium/src/+/master/docs/linux/build_instructions.md
usage() {
@faywong
faywong / how_to_build_aria2_on_osx.md
Created November 15, 2017 02:33
how_to_build_aria2_on_osx

安装 libxml2 之类的...

mkdir build-release
cd build-release

brew install python
export PATH="/usr/local/opt/python/libexec/bin:$PATH"
pip install virtualenv
@faywong
faywong / jni_exception_handle.c
Created August 3, 2017 04:16
JNI 异常处理
if ((*env)->ExceptionCheck(env)) {
LOGE("faywong step 0-001, exception occured!");
(*env)->ExceptionDescribe(env);
(*env)->ExceptionClear(env);
}
@faywong
faywong / index.js
Created July 19, 2017 14:41
replace all backslash with slash
str.replace(/\\/g, '/');