Skip to content

Instantly share code, notes, and snippets.

View Green-li's full-sized avatar
🎯
Focusing

maolong Li Green-li

🎯
Focusing
View GitHub Profile

Download CMake from: https://cmake.org/download/

wget https://cmake.org/files/v3.12/cmake-3.12.3.tar.gz

Compile from source and install

tar zxvf cmake-3.*
@Green-li
Green-li / Steps_multiple_cuda_environments.md
Created September 26, 2024 06:14 — forked from garg-aayush/Steps_multiple_cuda_environments.md
Managing multiple CUDA versions using environment modules in Ubuntu

Steps to manage multiple CUDA environments

Latest Update: May 19th, 2024

This gist contains all the steps required to:

  • Install multiple CUDA versions (e.g., CUDA 11.8 and CUDA 12.1
  • Manage multiple CUDA environments on Ubuntu using the utility called environment modules.
  • Use this approach to avoid CUDA environment conflicts.

Environment Modules is a package that provides for the dynamic modification of a user's environment via modulefiles. You can find more on it at https://modules.readthedocs.io/en/latest/

@Green-li
Green-li / docker-registry-mirrors.md
Created August 14, 2024 08:22 — forked from y0ngb1n/docker-registry-mirrors.md
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@Green-li
Green-li / ohmyzhs-gitee-install.sh
Created February 8, 2023 03:43
Install OhMyZsh using gitee.
#!/bin/sh
#
# This script should be run via curl:
# sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# or via wget:
# sh -c "$(wget -qO- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# or via fetch:
# sh -c "$(fetch -o - https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
#
# As an alternative, you can first download the install script and run it afterwards:
@Green-li
Green-li / fix.md
Created June 25, 2021 06:03
fix the 'no such file' or 'bad file descriptor' of vs-code extensions 'sftp'

Methods is from https://github.com/Natizyskunk/ssh2-streams/commit/e1db386ff9b0fc145c67dc13ada3e969d59cc51f#diff-11c2413775403ed66594f387ae0a38ec06ed746902424f86c7cbbbc7e395f4ca. change the lines in .vscode-server/extensions/liximomo.sftp-1.12.9/node_modules/ssh2-streams/lib/sftp.js

...
...
  // add after line No. 2730
  // Fix error No such file.
  options.autoDestroy = false;
  
...
@Green-li
Green-li / chinese_quantifier.txt
Last active May 28, 2021 06:18
中文量词词表。在中文中,量词的用法还挺多的,而且很多量词无法对应到英文中。
@Green-li
Green-li / open port on SELinux Centos 7
Last active November 2, 2021 06:40
open port on SELinux Centos 7
1. Start with checking the port allocation and confirming the port you want to allow access to isn't already being used,
`sudo semanage port -l | grep http_port_t`
2. Allow access to port
`sudo semanage port -a -t http_port_t -p tcp 12345`
3. Check firewall ports passthrough
`sudo firewall-cmd --list-all`
4. Add port (and make it permanent)
`sudo firewall-cmd --zone=public --add-port=12345/tcp --permanent`
5. Reload firewall for the changes to take effect
`sudo firewall-cmd --reload`