Skip to content

Instantly share code, notes, and snippets.

View aruruka's full-sized avatar
📚
learning go programming language

raymondyan aruruka

📚
learning go programming language
View GitHub Profile
@aruruka
aruruka / Pitfalls_Of_Running_An_Npx_Based_Mcp_Server_On_Windows.md
Created April 1, 2025 04:29
Pitfalls of running an npx-based MCP server on Windows.

Pitfalls of running an npx-based MCP server on Windows

I've been seriously trying to use MCP server for the past 2 days. Today, I successfully completed a small demo task using the coding agent plugin - Roo Code on VS Code. Here are some specific steps and pitfalls you're likely to encounter.

  1. I added 2 MCP Servers in Roo Code, namely:
  1. Initially, the "Filesystem" MCP server wouldn't run because I was using VS Code in Windows with PowerShell. If you're also a Windows user, you'll likely encounter errors running Node.js-based MCP servers. You can refer to the following two posts to resolve the issue:
@aruruka
aruruka / Running-a-public-server-from-WSL-2.md
Created November 30, 2023 02:22
Running a public server from WSL 2

Running a public server from WSL 2

Forward from: https://www.williamjbowman.com/blog/2020/04/25/running-a-public-server-from-wsl-2/

2020-04-25 :: linux, tricks, windows, wsl

This week, for ReAsOnS, I wanted to run a server on WSL 2 that was accessible from the internet. This was surprisingly involved and requires lots of hard-to-find tricks to forward ports through 4 different layers of network abstractions and firewalls.

  1. In WSL, make sure your server is using IPv4. I spent a hell of a long time just trying to figure out why I couldn’t access the server from localhost. I had successfully run a handful of local http servers from WSL that were accessible from the Windows host, so I wasn’t sure what the problem was. It turns out this server, written in Java, wouldn’t work until I added -Djava.net.preferIPv4Stack=true to the java options. It appears that Java was defaulting to IPv6, and WSL doesn’t forward IPv6 properly, or something.
@aruruka
aruruka / file_transferer_allower.py
Last active September 18, 2023 07:21
Transfer specified files from local host to remote hosts.Usage: `python3 file_transferer_allower.py <files_to_be_transferred_dir> <included_files> <remote_servers>`.Example: `python3 file_transferer_allower.py '/opt/mapr/conf/ca/' './CaCerts.txt' './remote_servers.txt'`
#!/usr/bin/env python3
import os
import paramiko
import argparse
def main():
parser = argparse.ArgumentParser()
parser.add_argument(
@aruruka
aruruka / WhatIsSre-Chinese.md
Last active June 20, 2023 11:45
What is SRE in my opinion?

发现了一个来自LinkedIn的关于SRE的非常好的教程👇: https://linkedin.github.io/school-of-sre/level101/systems_design/intro/ 其中它提到了Google的SRE教程(这个才是体系化的SRE)👇: https://sre.google/workbook/non-abstract-design/

通过搜索以及向New Bing提问,解除了我的一些疑惑:

  • 需求分析是软件生命周期中的一个阶段。软件生命周期包括: 需求分析、架构设计、详细设计、编码、测试、部署和维护。
  • "UML建模"可以在需求分析、架构设计和详细设计阶段使用,用于描述软件系统的静态和动态特征。
  • 在详细设计阶段之后,应该就产出了与具体代码密切相关的产物,比如类图、序列图、活动图等文档。
@aruruka
aruruka / UsefulSnippetsForMarkdownCreative.md
Last active September 17, 2023 14:43
Code snippets often used in Markdown writing, including HTML code for icons and interactive HTML code for accessibility.

Html image tags of icons frequently used in Markdown composing

Icons

Shell Icons

icon-bash-command

@aruruka
aruruka / CreateAdditionalUbuntuInstanceOfWsl2.md
Created March 10, 2023 04:45
Create additional Ubuntu instance of WSL2
@aruruka
aruruka / bash_note.md
Last active August 14, 2024 05:10
Bash scripts and snippets I commonly use.

Bash Note

Bash scripts and snippets I commonly use.

Powershell

Files

  • Look for directories with a name contains the string 'anime':
@aruruka
aruruka / install_pyenv_centos.sh
Last active December 25, 2021 08:47
install pyenv on CentOS
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
cd ~/.pyenv && src/configure && make -C src
echo -e 'if shopt -q login_shell; then' \
'\n export PYENV_ROOT="$HOME/.pyenv"' \
'\n export PATH="$PYENV_ROOT/bin:$PATH"' \
'\n eval "$(pyenv init --path)"' \
'\nfi' >> ~/.bashrc
echo -e 'if [ -z "$BASH_VERSION" ]; then'\
'\n export PYENV_ROOT="$HOME/.pyenv"'\
@aruruka
aruruka / clean_up_squadron_host_disk.py
Created June 30, 2021 17:23
Delete something to create some disk space for Squadron hosts. Python script.
#!/usr/bin/env python
# Purpose: Delete something to create some disk space for Squadron hosts.
# Prerequisite:
# This Python script is run by "make_disk_space_squadron_hosts.sh", on every Squadron CDP cluster host.
# Before running this script, make sure to stop all services including Cloudera Management Services,
# but only leave Zookeeper and HDFS running, because we'll use hdfs command to delete something on HDFS.
# Author: ShounenG
# --------------------------------------
import os, subprocess, socket, re, shutil
@aruruka
aruruka / make_disk_space_squadron_hosts.sh
Last active June 30, 2021 17:59
Delete something to create some disk space for Squadron hosts.
#!/usr/bin/env bash
# Purpose: Delete something to create some disk space for Squadron hosts.
# Prerequisite:
# Must run on c3669-node1.coelab.cloudera.com as root.
# Before running this script, make sure to stop all services including Cloudera Management Services,
# but only leave Zookeeper and HDFS running, because we'll use hdfs command to delete something on HDFS.
# This shell script runs Python script - "clean_up_squadron_host_disk.py", on every Squadron CDP cluster host.
# Author: ShounenG
# Usage:
# cd /root && \