把 URL 中的 /tree/main 替换为 /trunk 或 /branches/分支名
下载主分支的子文件夹
svn checkout https://github.com/{user_name}/{repo_name}/trunk/子文件夹路径下载其它分支的子文件夹
| #!/bin/bash | |
| # 判断是否传递了参数 | |
| if [ $# -eq 0 ]; then | |
| /Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea . > /dev/null 2>&1 | |
| else | |
| /Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea "$@" > /dev/null 2>&1 | |
| fi | |
| # 文件保存到 /usr/local/bin/idea 并给执行权限 |
| { | |
| "rewrites": [ | |
| { | |
| "source": "/:path*", | |
| "destination": "https://domain.com/:path*" | |
| } | |
| ] | |
| } |
把 URL 中的 /tree/main 替换为 /trunk 或 /branches/分支名
下载主分支的子文件夹
svn checkout https://github.com/{user_name}/{repo_name}/trunk/子文件夹路径下载其它分支的子文件夹
| export function onReachBottomContainer(container, callback, offset = 50) { | |
| const element = typeof container === 'string' ? document.querySelector(container) : container | |
| function onScroll() { | |
| const scrollHeight = element.scrollHeight | |
| const scrollTop = element.scrollTop | |
| const clientHeight = element.clientHeight | |
| if (scrollHeight - scrollTop <= clientHeight + offset) { | |
| callback() | |
| } |
| export function movable(element) { | |
| if (typeof element === 'string') { | |
| element = document.querySelector(element) | |
| } | |
| let isDragging = false | |
| let currentX | |
| let currentY | |
| let initialX | |
| let initialY |
| export function getMiddleString(src = '', left = '', right = '', more = false) { | |
| let leftIndex = src.indexOf(left) | |
| if (leftIndex === -1) { | |
| return '' | |
| } | |
| leftIndex += left.length | |
| let rightIndex | |
| if (more) { | |
| rightIndex = src.lastIndexOf(right, leftIndex) |
| #!/bin/sh | |
| hostip=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }') | |
| wslip=$(hostname -I | awk '{print $1}') | |
| port=7890 | |
| PROXY_HTTP=${hostip}:${port} | |
| export https_proxy=http://${PROXY_HTTP} http_proxy=http://${PROXY_HTTP} all_proxy=socks5://${PROXY_HTTP} |