Skip to content

Instantly share code, notes, and snippets.

View razhangwei's full-sized avatar

Wei Zhang razhangwei

  • Facebook
  • Bay Area
View GitHub Profile
@razhangwei
razhangwei / systemctl.sh
Created July 3, 2024 17:00
systemctl #unix
systemctl status nginx
systemctl stop nginx
@razhangwei
razhangwei / mac_xbox_controller.md
Last active July 2, 2024 04:37
Stop Mac controller Xbox/PS5 Home button opening Launchpad /
defaults write com.apple.GameController bluetoothPrefsMenuLongPressAction -integer 0 
# defaults write com.apple.GameController bluetoothPrefsShareLongPressSystemGestureMode -integer -1  # This doesn't seem needed. 

https://www.youtube.com/watch?v=twDp-WGART8

@razhangwei
razhangwei / activity_watch.md
Last active July 28, 2024 05:15
ActivityWatch
@razhangwei
razhangwei / adguardhome.md
Last active July 4, 2024 05:59
AdGuard Home OMV
  • MAC VLAN?

    • Why: To simplify port mapping.
    • How:
      • Method 1: defined in docker-compose.yaml (Preferred. See the attached snippet).
      • Method 2: created in OMV compose GUI. (Not recommended since it only support IPv6).
    • what the limiation?
      • the new ip from mac vlan can only be accessed from other local devices on the same LAN but not from the docker host. That means local request forwarding is possible by other services like Caddy.
  • How to support IPv6?

@razhangwei
razhangwei / df_html.py
Created June 14, 2024 21:50
pandas display html
from IPython.display import display, HTML
t.url = t.url.apply(lambda x: f'<a href="{x}">Link</a>')
display(HTML(t.to_html(escape=False)))
@razhangwei
razhangwei / automation_meta.md
Created June 14, 2024 17:48
Automate daily tasks at Meta

What tasks?

  • Check the latest posts
  • Check the latest tech notes shared in some FYI groups.
  • Check and track launches.
@razhangwei
razhangwei / google_app_scripts.md
Created June 14, 2024 05:28
Google App Scripts

foo

@razhangwei
razhangwei / metamate.md
Created June 12, 2024 23:21
Metamate #LLM
  • Add shortcut for chrome plugin, e.g., Shift + CMD + J
@razhangwei
razhangwei / ollama.md
Last active June 13, 2024 04:15
Ollama cheatsheet
  • download and install Ollama.
  • Running a particular LLM is as simple as ollama run llama3, which will pull the corresponding model to local.

Using Ollama with Obsidian

  • Obsidian Copilot
    • Vault QA.

Using