Skip to content

Instantly share code, notes, and snippets.

@egolearner
egolearner / faiss_install_notes_on_catalina.md
Last active November 4, 2020 05:52 — forked from maxime/faiss_install_notes_on_high_sierra.md
Install Facebook FAISS on macOS Catalina

Those instructions are working for me as of Nov. 2020. Using Homebrew and maOS 10.15.7

Install xCode command line tools (if you don't have it already)

xcode-select --install

Install LLVM

@egolearner
egolearner / squirrel.diff
Created November 26, 2020 09:43
macos big sur 编译squirrel on 2020-11-26
# based on commit 118aee617089b4c7a3e448a42ea0b4c65eae5895
diff --git a/Squirrel.xcodeproj/project.pbxproj b/Squirrel.xcodeproj/project.pbxproj
index 9ab6c4a..77fc0b8 100644
--- a/Squirrel.xcodeproj/project.pbxproj
+++ b/Squirrel.xcodeproj/project.pbxproj
@@ -620,6 +620,7 @@
PRODUCT_BUNDLE_IDENTIFIER = im.rime.inputmethod.Squirrel;
PRODUCT_NAME = Squirrel;
SDKROOT = macosx;
+ VALID_ARCHS = x86_64;
@egolearner
egolearner / cheat_sheet.txt
Created August 4, 2022 02:47
GDB cheat sheet
GDB commands by function - simple guide
---------------------------------------
More important commands have a (*) by them.
Startup
% gdb -help print startup help, show switches
*% gdb object normal debug
*% gdb object core core debug (must specify core file)
%% gdb object pid attach to running process
% gdb use file command to load object
/* global api */
class enen_Collins2 {
constructor(options) {
this.options = options;
this.maxexample = 2;
this.word = '';
}
async displayName() {
let locale = await api.locale();
/* global api */
class enen_Cambridge {
constructor(options) {
this.options = options;
this.maxexample = 2;
this.word = '';
}
async displayName() {
return 'Cambridge EN->EN Dictionary';
import re
from collections import defaultdict
import sys
def parse_thread_stacks(input_text):
"""
Parse the input text to extract thread IDs and their corresponding stacks.
"""
threads = {}
current_tid = None
@egolearner
egolearner / CentOS-Base.repo
Created October 31, 2025 08:39 — forked from weimeng23/CentOS-Base.repo
aliyun centos7 yum mirror repo. CentOS Linux 7 reached end of life (EOL) on June 30, 2024
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#