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
https://press.one/p/address/v?s=9b2dc25eeed15dd4ee6f8669ef7a59c73cbf0f122cd54e80b5298bcabddb8653bb5b15d8dde87ee6ea75e9666d073e7dd026f1bab31557c03c7ea19b9b942e770&h=c166e2d763c8a0c0a1977aebe694f086b89fcbf01a2461d13fb17ba6e56682f3&a=98f8556378d76f061e3ccd2853781d907b52d4db&f=P1&v=2
@wyudong
wyudong / ico.sol
Created June 14, 2018 11:05
Test Ethereum ICO contract
pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
// Duanwu CROWDSALE token contract
//
// Deployed to : 0x5364c53b7ed2fd68ccbf7b7e333ab12e023fd12e
// Symbol : ZZ
// Name : Zongzi
// Total supply: Gazillion
// Decimals : 18
.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];