Skip to content

Instantly share code, notes, and snippets.

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

Kane Blueriver kxxoling

💉
💊💊💊
View GitHub Profile
""""""""""""""""""""""
" 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 / locale-c
Created June 8, 2015 04:13
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.utf8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
{
"$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
@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') {
@kxxoling
kxxoling / dropbox-scss-css-style-guide.md
Last active March 17, 2020 10:10
Dropbox (S)CSS 样式指南中文翻译

Dropbox (S)CSS 样式指南翻译

开源许可

“Every line of code should appear to be written by a single person, no matter the number of contributors.” —@mdo

通用部分

反例

  • 避免在 CSS 使用 HTML 标签选择器
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";
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory