Skip to content

Instantly share code, notes, and snippets.

Avatar
😳
失去才会懂得珍惜

PegasusWang PegasusWang

😳
失去才会懂得珍惜
View GitHub Profile
@PegasusWang
PegasusWang / mac.md
Created December 7, 2021 07:31 — forked from lornajane/mac.md
Keyboard Only OS X
View mac.md

Keyboard-only Mac Cheatsheet

Hi, I'm Lorna and I don't use a mouse. I have had RSI issues since a bad workstation setup at work in 2006. I've tried a number of extra hardware modifications but what works best for me is to use the keyboard and only the keyboard, so I'm in a good position and never reaching for anything else (except my coffee cup!). I rather unwisely took a job which required me to use a mac (I've been a linux user until now and also had the ability to choose my tools carefully) so here is my cheatsheet of the apps, tricks and keyboard shortcuts I'm using, mostly for my own reference. Since keyboard-only use is also great for productivity, you may also find some of these ideas useful, in which case at least something good has come of this :)

Apps List

There's more detail on a few of these apps but here is a quick overview of the tools I've installed and found helpful

Tool Link Comments
View Oh my zsh with autosuggestions & syntax-highlighting.md

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@PegasusWang
PegasusWang / .gitconfig
Created February 20, 2019 05:43 — forked from rambabusaravanan/.gitconfig
Git Diff and Merge Tool - IntelliJ IDEA
View .gitconfig
# Linux
# add the following to "~/.gitconfig" file
[merge]
tool = intellij
[mergetool "intellij"]
cmd = /usr/local/bin/idea merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED")
trustExitCode = true
[diff]
@PegasusWang
PegasusWang / tcp_echo_server_callback.py
Created September 21, 2018 01:03
使用回调方式实现异步 TCPEchoServer
View tcp_echo_server_callback.py
# https://zhuanlan.zhihu.com/p/42044997 Python 异步 web 框架是如何工作的[视频]
import selectors
import socket
class EventLoop:
def __init__(self, selector=None):
if selector is None:
selector = selectors.DefaultSelector()
self.selector = selector
View HTML-presentation-tools.md

#HTML presentation tools

There are many HTML presentation tools and they are all created for slightly different reasons. Here's an overview. Please let me know if I forgot any.

##CSSS

CSS-based SlideShow System

@PegasusWang
PegasusWang / ffmpeg.md
Created July 29, 2018 02:12 — forked from ameizi/ffmpeg.md
ffmpeg视频合并、格式转换、截图
View ffmpeg.md

使用ffmpeg合并MP4文件

ffmpeg -i "Apache Sqoop Tutorial Part 1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i "Apache Sqoop Tutorial Part 2.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "Apache Sqoop Tutorial Part 3.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
ffmpeg -i "Apache Sqoop Tutorial Part 4.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate4.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts|intermediate4.ts" -c copy -bsf:a aac_adtstoasc "Apache Sqoop Tutorial.mp4"
View backend-architectures.md
@PegasusWang
PegasusWang / iterm2.md
Created April 21, 2018 01:50 — forked from nobitagit/iterm2.md
iterm2 cheatsheet
View iterm2.md

Tabs and Windows

Function Shortcut
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow
Go to Split Pane by Order of Use + ] , + [