tips for time management

backgroud Time > Money. tips 1. The 2-Minute Rule If it takes less than 2 minutes, do it now, Yes, even if it’s getting up to stretch Procrastination is for stretching, not tasks! 2. The 5-Minute Rule try it more than 5 minutes even the task is hard. 3. Eat the Frog First Tackle the hardest task first thing in the morning, Frogs taste better when you’re notthinking about them all day. ...

April 3, 2024

A Step-by-Step Guide to Setting Up Solana on Ubuntu

Install Rust 1 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y install solana CLI 1 sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)" 1 solana --version Install Anchor CLI 1 2 3 sudo apt install build-essential cargo install --git https://github.com/coral-xyz/anchor avm --force 1 2 3 4 5 6 7 avm install latest avm use latest anchor --version install nvm and node 1 curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash 1 2 export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm 1 2 nvm install node npm install --global yarn

April 2, 2024

upgrade ubuntu in WSL

show lsb-release before upgrade 1 2 3 4 5 6 cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS" prepare open file with command is as follows: 1 sudo nano /etc/update-manager/release-upgrades set Prompt=lts is as follows: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 # Default behavior for the release upgrader. [DEFAULT] # Default prompting and upgrade behavior, valid options: # # never - Never check for, or allow upgrading to, a new release. # normal - Check to see if a new release is available. If more than one new # release is found, the release upgrader will attempt to upgrade to # the supported release that immediately succeeds the # currently-running release. # lts - Check to see if a new LTS release is available. The upgrader # will attempt to upgrade to the first LTS release available after # the currently-running one. Note that if this option is used and # the currently-running release is not itself an LTS release the # upgrader will assume prompt was meant to be normal. Prompt=lts CTRL+S to save, then CTRL+X to exit. ...

April 2, 2024

WSL command: export, import

list before export 1 wsl -l -v 1 2 3 PS C:\Users\mysel> wsl -l -v NAME STATE VERSION * Ubuntu-22.04 Stopped 2 delete cache to reduce disk cost 1 rm -rf /home/ia/.cache/* export 1 wsl.exe --export Ubuntu-22.04 I:\wslback\Ubuntu-22.04.bak import 1 wsl.exe --import U22 i:\wsl\u22\ d:\wslback\Ubuntu-22.04.bak run 1 wsl.exe -d U22 list after import 1 wsl -l -v 1 2 3 4 PS C:\Users\mysel> wsl -l -v NAME STATE VERSION * Ubuntu-22.04 Stopped 2 U22 Running 2 show location 1 Get-ChildItem HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss | ForEach-Object {Get-ItemProperty $_.PSPath} | Select-Object DistributionName,BasePath access from explorer 1 \\wsl.localhost\U22 add to Windows Terminal 1 2 3 4 5 6 7 8 { "commandline": "wsl.exe -d U22", "guid": "{e5a83caa-4c73-52b3-ae6b-bc438d721ef9}", "hidden": false, "name": "U22", "source": "CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc", "startingDirectory": "~" },

April 1, 2024

setup CUDA development environment in WSL2

Install the GCC compiler 1 sudo apt install gcc --fix-missing Install Nvidia CUDA toolkit 1 sudo apt install nvidia-cuda-toolkit check the Driver and CUDA versions 1 2 nvidia-smi nvcc -V Install Python with Mamba 1 2 wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh bash Miniforge3-Linux-x86_64.sh 1 2 3 mamba create -n mycuda jupyterlab -c conda-forge mamba activate mycuda jupyter lab Testing Cuda Search nvidia control panel, and select “Allow access to GPU performance counters to all users” ...

March 30, 2024

thoughts about do the thing

what to do ? do the right thing how to do? right do the thing what to done/got ? do the thing right priority do the right thing right do the thing do the thing right

March 29, 2024

The Essence of Transurfing

define Transurfing is a philosophy developed by Vadim Zeland that focuses on transforming one’s perception of reality and shaping life experience through the power of thought and intention1. It offers a set of twelve golden rules to guide practitioners in navigating life effortlessly Essence 1. Unification of Mind and Soul Inner Harmony: The unification and coordination of the mind and soul are at the core of Transurfing. The soul represents the deepest desires and truths, while the mind is responsible for logic and reason. Harmonizing the two leads to inner peace and alignment. ...

March 28, 2024

setup python development environment in WSL

requirement 1 2 3 4 5 6 7 8 sudo apt update sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev sudo apt-get install lzma sudo apt-get install liblzma-dev sudo apt-get install libbz2-dev sudo apt-get install python3-tk pyenv what is pyenv pyenv is for a Python version management + virtual environment tool. install pyenv 1 curl https://pyenv.run | bash pyenv 1 2 3 echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc echo 'eval "$(pyenv init -)"' >> ~/.bashrc 1 source ~/.bashrc usage List all available pyenv commands 1 pyenv commands List all available Python versions 1 pyenv install -l Installing specific Python versions 1 pyenv install 3.12.0 Uninstall a specific python version 1 pyenv uninstall 3.12.0 Show all Python versions 1 pyenv versions Setting the global Python version 1 pyenv global 3.12.0 Display the currently active Python version 1 pyenv version Display the full path to the Python version 1 pyenv which python Set a shell-specific Python version 1 pyenv shell 3.12.0 Unsets the shell version 1 pyenv shell --unset Set a local Python version 1 pyenv local 3.11.5 Unset the local Python version 1 pyenv local --unset install pyenv-virtualenv install pyenv-virtualenv 1 2 3 $ git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv $ echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc $ source ~/.bashrc pyenv-virtualenv ...

March 27, 2024

WSL-network

static ip address 1 2 3 4 5 6 7 8 9 10 netsh int ipv4 show interfaces Idx Met MTU 状态 名称 --- ---------- ---------- ------------ --------------------------- 1 75 4294967295 connected Loopback Pseudo-Interface 1 10 50 1500 disconnected WLAN 3 35 1500 connected 以太网 14 25 1500 disconnected 本地连接* 1 12 25 1500 disconnected 本地连接* 2 44 15 1500 connected vEthernet (WSL (Hyper-V firewall)) setup static ip address: ...

March 26, 2024

windows terminal

install On windows11, windows terminal has installed as default. If not, Please install windows terminal from Microsoft Store. update PowerShell Get PowerShell Version: 1 2 3 4 5 6 7 8 9 10 11 12 13 $PSVersionTable Name Value ---- ----- PSVersion 5.1.22621.2506 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.22621.2506 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 update PowerShell: ...

March 25, 2024