Skip to content

Instantly share code, notes, and snippets.

View kxxoling's full-sized avatar
💉
💊💊💊

Kane Blueriver kxxoling

💉
💊💊💊
View GitHub Profile
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "王然",
"label": "Full-stack Engineer",
"image": "https://www.gravatar.com/avatar/f57c37f3c6998ec641ec37178f994aa1?s=200&r=pg&d=mm",
"email": "kxxoling@gmail.com",
"phone": "+86 18513583131",
"summary": "I'm a skilled Full-stack web developer with passion for building innovative and user-friendly applications from scratch. My expertise extends across the entire software development life cycle, from implementing intuitive user interfaces to optimizing back-end functionality for seamless performance. I'm deeply committed to staying up-to-date with the latest advancements in technology, and I thrive on the challenge of exploring new and emerging tools and techniques. As a result, I'm always eager to take on new roles and responsibilities that push me to learn and grow as a developer. I'm excited to leverage my skills and experience to create cutting-edge solutions that excee
""""""""""""""""""""""
" Leader
""""""""""""""""""""""
" let mapleader=,
" can't set leaders in Obsidian vim, so the key just has to be used consistently.
" However, it needs to be unmapped, to not trigger default behavior: https://github.com/esm7/obsidian-vimrc-support#some-help-with-binding-space-chords-doom-and-spacemacs-fans
unmap ,
" map ; to : in normal mode, so that I don’t rely on the shift key
" nmap ; :
@kxxoling
kxxoling / vmware-fusion-personal-register.md
Created November 23, 2022 12:30
VMWare fusion 13 许可证密钥申请失败怎么办?

申请 VMWare fusion 个人许可证的时候遇到了 Invalid Address Line, city, zip/postal code, country/territory combination. 错误怎么办?

image

在 VMWare 的论坛上找到了相关主题, 实际上和很多人遇到的 Can't create customer connect account 问题似乎是一致的,有人提到 VMWare 的校验器似乎是能识别德国地址的, 可以尝试在 Address 1 前面加上数字,我这里选择了邮编 100086,但还是不行。于是又随便补充了 Address 2 就通过了验证。

// edited from https://superuser.com/a/1535814
function chrome_summary() {
local wincount=$(osascript -e 'tell application "Google Chrome" to get number of windows')
# [ "$wincount" -eq 0 ] && echo "zero windows!" && return
local tabscount=$((0))
# local json="["
for (( i=1; i<=$wincount; i++)); do
# json="$json""["
local cmd="osascript -e 'tell application \"Google Chrome\" to get number of tabs in window $i'"
local tabcount=$(eval $cmd)
@kxxoling
kxxoling / error.ts
Created September 15, 2020 00:23
在Typescript里extends Error的终极方案
// From https://zhuanlan.zhihu.com/p/113019880
// 使用 BaseError 当作 base Error class
class BaseError extends Error {
constructor(message: string) {
super(message);
this.name = new.target.name;
if (typeof (Error as any).captureStackTrace === 'function') {
(Error as any).captureStackTrace(this, new.target);
}
if (typeof Object.setPrototypeOf === 'function') {
document.querySelectorAll(".diff-table").forEach(table => {
table.onmouseover = evt => {
if (evt.target.tagName !== "TD") {
return;
}
const cellIndex = evt.target.cellIndex;
table
.querySelectorAll(`tr td.blob-code:nth-child(${cellIndex === 1 ? 2 : 4})`)
.forEach(el => {
el.style["userSelect"] = "auto";
# 你好,欢迎学习 Makefile 基础!
#
# 这里我将向大家介绍 `make` 的优秀之处,虽然语法上有点“奇怪”,但却是一个高效、
# 快速、强大的程序构建解决方案。
#
# 学完了这里的基础之后,建议你前往 GNU 官网
# http://www.gnu.org/software/make/manual/make.html
# 更加深入 `make` 的用法。
# `make` 命令必须在一个存在 `Makefile` 文件的目录使用,当然,你也可以使用
@kxxoling
kxxoling / Dockerfile
Last active January 9, 2018 07:46
Jupyter notebook with Python 2 and 3 based on anaconda image.
FROM continuumio/anaconda
RUN apt-get update && apt-get install -y python-dev python3-dev python-pip python3-pip
RUN conda create -y -n py27 python=2.7
RUN /bin/bash -c "source activate py27"
RUN conda install -y notebook ipykernel
RUN ipython kernel install --user
RUN conda create -y -n py36 python=3.6
RUN /bin/bash -c "source activate py36 && conda install -y notebook ipykernel && ipython kernel install --user"
RUN echo '🔥❄⚡'
EXPOSE 8888
import datetime
import heapq
import types
import time
class Task:
"""Represent how long a coroutine should wait before starting again.
"""这是所有路径的解法"""
_grids = [[3, 5, 1],
[2, 1, 5],
[4, 2, 1]]
directions = [(0, 1), (1, 0), (0, -1), (-1, 0)]
class Path():