Skip to content

Instantly share code, notes, and snippets.

View wey-gu's full-sized avatar
🥑
Believe in OpenSource and build in public w/ magic to help others do the same.

Wey Gu wey-gu

🥑
Believe in OpenSource and build in public w/ magic to help others do the same.
View GitHub Profile
@wey-gu
wey-gu / Nerd.md
Created January 1, 2025 15:21 — forked from gbishop/Nerd.md
Make Nerd fonts work with the Chromebook terminal

Make Nerd fonts work with the Chromebook terminal

Here is a too complicated hack to make Nerd fonts work on the Chromebook terminal. There should be an easier way. Please tell me if you find it.

First we need a CORS compliant web server to fetch the font. I didn't want to have to be online to use the terminal so I'm going to run the server locally. Fetch the server.py file (below) and save it to your linux environment. I put it in ~/hacks/nerdfont/server.py. This little script adds the CORS headers to the python3 http server. It will only serve files from the current folder.

In my ~/.bashrc I added these lines:

# make the nerdfont available to the chromebook terminal
@wey-gu
wey-gu / zig_and_ghostty_install_on_linux.md
Created December 31, 2024 16:01
Install zig and build ghostty on Linux
# Step 0
# Place prebuild zig binary, say 0.13.0, check latest stable release via https://ziglang.org/download/

wget https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz
xz -d -v zig-linux-x86_64-0.13.0.tar.xz
tar xvf zig-linux-x86_64-0.13.0.tar
sudo mkdir -p /opt
sudo mv zig-linux-x86_64-0.13.0 /opt/
@wey-gu
wey-gu / slidev_tips.md
Created November 5, 2024 11:07
Slidev Tips

Global Background Image

Just tweak with your global-bottom.vue:

<template>
    <footer class="absolute bottom-2 left-6 right-6 p-2 flex items-center justify-between">
        <!-- The background -->
 
@wey-gu
wey-gu / expose_local_port_with_public_server_via_sshd.md
Last active October 14, 2024 11:32
Expose Local Port to Public Network with SSHD Remote Tunnel
  1. ensure remote server enables remote port fwd on non-loopback ip
#/etc/ssh/sshd_config
GatewayPorts yes
  1. ssh
@wey-gu
wey-gu / paul_graham_essay.txt
Created March 12, 2024 09:06
Paul Graham Essay
What I Worked On
February 2021
Before college the two main things I worked on, outside of school, were writing and programming. I didn't write essays. I wrote what beginning writers were supposed to write then, and probably still are: short stories. My stories were awful. They had hardly any plot, just characters with strong feelings, which I imagined made them deep.
The first programs I tried writing were on the IBM 1401 that our school district used for what was then called "data processing." This was in 9th grade, so I was 13 or 14. The school district's 1401 happened to be in the basement of our junior high school, and my friend Rich Draves and I got permission to use it. It was like a mini Bond villain's lair down there, with all these alien-looking machines — CPU, disk drives, printer, card reader — sitting up on a raised floor under bright fluorescent lights.
The language we used was an early version of Fortran. You had to type programs on punch cards, then stack them in the card reader and press a
@wey-gu
wey-gu / cs1.6_on_chromeos.md
Last active December 31, 2023 08:41
Counter-Strike 1.6 with Bots on ChromeOS

Steam

For newer devices, install the ChromeOS Steam (Beta), for Intel gen-7 i5 like me, install the steam for Linux version directly, and it worked like a charm!

CS 1.6

Just go to lib of Steam and Install

Bot

@wey-gu
wey-gu / clipboard_nvim_chromebook.md
Created December 26, 2023 12:59
NeoVim Clipboard configuration for ChromeOS terminal
wget https://raw.githubusercontent.com/lotabout/dotfiles/master/bin/clipboard-provider
sudo mv clipboard-provider /usr/bin/
sudo chmod +x /usr/bin/clipboard-provider
vim.opt.clipboard:append("unnamedplus")
-- Check if clipboard-provider is executable
if vim.fn.executable('clipboard-provider') then
@wey-gu
wey-gu / reproduce_v1.md
Last active November 13, 2023 11:14
NebulaGraph v1 scan data after schema alter

Quickly setup env

git clone --branch v1.0 https://github.com/vesoft-inc/nebula-docker-compose.git
cd nebula-docker-compose
docker-compose up -d


docker run --rm -ti --network=host vesoft/nebula-console:v1.2.1 -u root -p nebula --addr=127.0.0.1 --port=3699
@wey-gu
wey-gu / KnowledgeGraphIndex_vs_VectorStoreIndex_vs_CustomIndex_combined.ipynb
Last active March 10, 2024 17:37
Example to load docs from a new page in Wikipedia: https://en.wikipedia.org/wiki/2023_in_science created after the 2021 Sept, where 1. how to best leverage kg + vector store backed custom index was demonstrated, 2. the extra cost, performance was evaluated. For review of https://github.com/jerryjliu/llama_index/pull/6497
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.