Skip to content

Instantly share code, notes, and snippets.

@yetone
yetone / macos-tmux-256color.md
Created Jan 9, 2022 — forked from bbqtd/macos-tmux-256color.md
Installing tmux-256color for macOS
View macos-tmux-256color.md

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):

@yetone
yetone / karabiner.json
Last active Sep 6, 2021
Karabiner 通过 left shift 来切换中英文
View karabiner.json
{
"description": "Switch between zh-Hans <-> en (left_shift)",
"manipulators": [
{
"conditions": [
{
"input_sources": [
{
"language": "en"
}
@yetone
yetone / cloudSettings
Last active Jul 8, 2021
vscode-settings-public
View cloudSettings
{"lastUpload":"2020-05-13T10:46:00.823Z","extensionVersion":"v3.4.3"}
@yetone
yetone / !.md
Last active Apr 12, 2021
Resume
View !.md

个人信息

  • 管锡鹏 / 男 / 1991.11.16
  • 手机: 15166185303 (山东省日照市)
  • Email: yetoneful@gmail.com
  • 本科 / 光电信息工程 / 华中科技大学文华学院 / 2010.09 ~ 2014.07
  • 工作年限: 7年
  • GitHub: https://github.com/yetone
  • 期望职位: Python 开发工程师 / DevOps
  • 期望工作地点: 北京
View dom2img.js
const noop = () => {}
const supportsCSSText = getComputedStyle(document.body).cssText !== ''
function copyCSS(elem, origElem) {
let computedStyle = getComputedStyle(origElem)
if (supportsCSSText) {
elem.style.cssText = computedStyle.cssText
} else {
Object.keys(computedStyle).forEach(prop => {
View .ideavimrc
" Selected Intellimacs modules
source ~/.intellimacs/spacemacs.vim
source ~/.intellimacs/extra.vim
source ~/.intellimacs/major.vim
source ~/.intellimacs/hybrid.vim
" My own vim commands
nnoremap Y y$
" Comma for major mode
View karabiner.json
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@yetone
yetone / gist:7a7bac261f96657aeef5fd98be50b5ff
Created Nov 15, 2019 — forked from pfreixes/gist:3187511
Supervisorctl bash autocomplete
View gist:7a7bac261f96657aeef5fd98be50b5ff
# pfreixes, 2012-07-27
# Add to /etc/bash_completion.d/supervisorctl
_supervisor()
{
local cur prev opts base
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
View prioritized_lock.py
from threading import RLock
from typing import Dict
class _RLockWrapper:
def __init__(self):
self.lock = RLock()
self.count = 0
def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool:
View sk-tools.sh
__cursor_pos () {
local pos
exec {tty}<>/dev/tty
echo -n '\e[6n' >&$tty; read -rsdR pos <&$tty
exec {tty}>&-
[[ $pos =~ '([0-9]+);([0-9]+)$' ]]
print $match[1] $match[2]
}
__calc_height () {