Skip to content

Instantly share code, notes, and snippets.

View koji's full-sized avatar
🔍
I may be slow to respond.

koji koji

🔍
I may be slow to respond.
View GitHub Profile
@koji
koji / mcp_asdf.md
Created March 22, 2025 03:14
get sample mcp config for asdf env
#!/bin/bash

# Get full path to npx
FULL_PATH_TO_NPX=$(which npx)

# Extract ASDF shims directory (remove '/npx' from the path)
PATH_TO_ASDF_SHIMS_DIR=$(dirname "$FULL_PATH_TO_NPX")

# Get full path to asdf
@koji
koji / install-cli-tools.md
Last active January 2, 2025 08:24
add cli tools to wsl
@koji
koji / install-asdf.sh
Last active January 2, 2025 08:09
a shell script to setup WSL environment
# Install ASDF version manager and plugins
if ! command -v asdf &> /dev/null; then
brew install asdf
echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ${ZDOTDIR:-~}/.zshrc
fi
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git || true
asdf plugin add python || true
asdf plugin add rust || true
@koji
koji / poetry_commands.md
Created April 2, 2024 03:45
poetry commands
# create a new project
poetry new {project_name}

# add a package
poetry add {package_name}

# install dependencies
poetry install
@koji
koji / pr_count.py
Created December 21, 2023 07:34
count the prs you merged in 2023
import json
import subprocess
# This script requires gh command if you don't have it, you need to install.
# Run the gh command and get the output
user_id = input('Enter your github id: ')
repo_owner = input('Enter repo owner: ')
repo = input('Enter repo name: ')
limit = input('Enter limit num: ')
@koji
koji / DockerFile_commands_note.md
Last active November 25, 2023 19:43
DockerFile note

remove cache

RUN apt autoremove -y &&\
  apt-get clean &&\
  rm -rf /usr/local/src/*

pip

#!/bin/bash

folder_path="./protocols"
output_file="./simulate_output.txt"

for file_path in $folder_path/*.py; do
  echo "run $file_path" >> "$output_file"
  output=$(opentrons_simulate "$file_path")
 echo "$output" >> "$output_file"
@koji
koji / prevent_wsl_auto_file_creation.md
Created December 15, 2022 02:26
Prevent wsl's auto file creation resolv.conf

when running wsl, wsl creates resolv.conf and add useless nameserver. the following is to prevent that.

zsh

sudo rm /etc/resolv.conf
sudo zsh -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf'
sudo zsh -c 'echo "[network]" > /etc/wsl.conf'
sudo zsh -c 'echo "generateResolvConf = false" >> /etc/wsl.conf'
@koji
koji / return.md
Created August 13, 2021 05:43
TikTokApi
{
   "id":"6980139750690950405",
   "desc":"#umortiktok #umor2021 #viraltiktok #sonrriesoloeshumor🤣",
   "createTime":1625190436,
   "video":{
      "id":"6980139750690950405",
      "height":1024,
      "width":576,
      "duration":8,
@koji
koji / tmp_script_for_nextjs.md
Last active May 8, 2021 20:19
Temporary script for
#!/bin/bash
# create tsconfig.json
echo "Create tsconfig.json"
touch tsconfig.json

# install packages for typescript
echo "install packages"
YARNCOMMAND='yarn add --dev typescript @types/react @types/node'
if $YARNCOMMAND ; then