Skip to content

Instantly share code, notes, and snippets.

# System
alias ls='ls -G'
alias ll='ls -ahl'
alias ..='cd ..'
alias ...='cd ../..'
alias rrr='rm -rf'
alias editbash='vi ~/.bashrc'
alias editalias='vi ~/.bash_aliases'
alias sb='source ~/.bashrc && echo "Done!"'
@wyudong
wyudong / .editorconfig
Created May 23, 2019 09:26
Sample editor config
root = true
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
[*.{js,vue}]
@wyudong
wyudong / shadowsocks-all.sh
Created February 13, 2019 06:31
Backup for shadowsocks-all.sh
#!/usr/bin/env bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
#
# Auto install Shadowsocks Server (all version)
#
# Copyright (C) 2016-2019 Teddysun <i@teddysun.com>
#
# System Required: CentOS 6+, Debian7+, Ubuntu12+
#

OS: centos_x86 bbr

ssh root@<server_ip> -p <port>
sudo yum -y install wget
wget --no-check-certificate -O shadowsocks-all.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-all.sh
chmod +x shadowsocks-all.sh
./shadowsocks-all.sh 2>&1 | tee shadowsocks-all.log
.status-modified,
.status-added,
.status-renamed,
.status-removed {
color: inherit;
background-color: inherit;
&.directory > .list-item {
color: inherit !important;
background-color: inherit !important;
{
"server":"[server-ip]",
"server_port":8888,
"local_port":1800,
"password":"123456",
"timeout":500,
"method":"aes-256-cfb"
}
  • Check brew health: brew doctor
  • Update brew itself: brew update
  • Update all installed packages: brew upgrade
  • Install package: brew install FORMULA
  • Uninstall package: brew uninstall FORMULA
  • List all installed packages: brew list
  • Remove all old version packages: brew cleanup
var values = {
friction: 0.8,
timeStep: 0.01,
amount: 15,
mass: 2,
count: 0
};
values.invMass = 1 / values.mass;
var path, springs;
var size = view.size * [1.2, 1];
@wyudong
wyudong / free-up-xcode.md
Created September 10, 2016 03:48
Free up disk space from Xcode

Free up disk space from Xcode

These items can be deleted safely.

iOS Device Support

In Finder: ~/Library/Developer/Xcode/iOS DeviceSupport/

Derived Data

@wyudong
wyudong / atom-shortcut-cheatsheet.md
Last active July 3, 2016 05:52
Useful commands and shortcuts for Atom editor

Atom Shortcut Cheatsheet

Moving

Command Description
control + a Go to the start of the line
control + e Go to the end of the line
control + b Move cursor one character backward
control + f Move cursor one character forward