Skip to content

Instantly share code, notes, and snippets.

Edward Chu chuyik

Block or report user

Report or block chuyik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@chuyik
chuyik / README.md
Last active Jun 4, 2020
macOS 给 Git(Github) 设置代理(HTTP/SSH)
View README.md
@chuyik
chuyik / gist:e7dc74d6f1bf1725a01bf95e095067fd
Created May 26, 2020
macOS 出现「䀋」的解决方法
View gist:e7dc74d6f1bf1725a01bf95e095067fd

当浏览器显示「低」字的时候,有可能会显示错误,出现「䀋」字。

这种字符的错误映射目前只发现在「Hiragino Sans GB」字体上出现,解决方法是:

打开 FontBook,找到「Hiragino Sans GB」字体,Disable & Enable 即可。

@chuyik
chuyik / install.sh
Last active May 17, 2020
Bandwagon(搬瓦工) CentOS 7 安装 shadowsocks-libev 和 kcptun
View install.sh
######################
## shadowsocks-libev
######################
# install dependencies
yum install epel-release -y
yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto udns-devel libev-devel -y
# install shadowsocks-libev
cd /etc/yum.repos.d/
View custom_type_guards.ts
interface LayerEffect {
opacity?: number
}
interface DropShadowEffect extends LayerEffect {
blur?: number
}
interface ColorEffect extends LayerEffect {
color?: string
@chuyik
chuyik / index.bash
Last active Dec 17, 2019
Centos 6 curl SSL problem
View index.bash
# use this to debug git fetch
export GIT_CURL_VERBOSE=1
# use aliyun mirror to install new packages
wget -O /etc/yum.repos.d/Alibaba.repo http://mirrors.aliyun.com/repo/Centos-6.repo
yum update -y nss curl libcurl
@chuyik
chuyik / centos_6_repo_setup.sh
Last active Dec 17, 2019
各种 centos 6 依赖库
View centos_6_repo_setup.sh
# backup
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
# aliyun
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
wget -O /etc/yum.repos.d/ius.repo http://mirrors.aliyun.com/ius/ius-6.repo
# epel
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
@chuyik
chuyik / nginx.service
Created May 4, 2017
OpenResty Centos 7 启动脚本配置
View nginx.service
# OpenResty 默认安装在 /usr/local/openresty
# 该文件应该放在 /usr/lib/systemd/system/nginx.service
# 放好后请运行:
# - systemctl enable nginx.service
# - systemctl start nginx.service
# 然后之后就可以用 service nginx [start/reload/stop] 等命令了
[Unit]
Description=The nginx HTTP and reverse proxy server
After=syslog.target network.target remote-fs.target nss-lookup.target
@chuyik
chuyik / export_keynote.scpt
Created Mar 8, 2019
Keynote Presenter Notes Exporter 演讲者注释导出脚本
View export_keynote.scpt
--==============================
-- Send Keynote Text to Desktop Markdown File
-- Writted By: Richard Dooling https://github.com/RichardDooling/
-- Based on
-- Send Keynote Presenter Notes to Evernote
-- Version 1.0.1
-- Written By: Ben Waldie <ben@automatedworkflows.com>
-- http://www.automatedworkflows.com
-- Version 1.0.0 - Initial release
@chuyik
chuyik / .pylint
Last active Jun 17, 2019
Recommended PyLint Configuration
View .pylint
# Based on:
# https://github.com/kpreid/shinysdr/blob/master/pylintrc
[MASTER]
# XXX should be changed to your project folder
# see http://stackoverflow.com/a/37238692/3828891 for explanation
init-hook='base_dir="XXX"; import sys,os,re; _re=re.search(r".+\/" + base_dir, os.getcwd()); project_dir = _re.group() if _re else os.path.join(os.getcwd(), base_dir); sys.path.append(project_dir)'
[MESSAGES CONTROL]
# Find available symbolic names in:
@chuyik
chuyik / install_tls.sh
Last active Jun 13, 2019
CentOS 7 Nginx(OpenResty) Let’ s Encrypt SSL 证书安装配置
View install_tls.sh
# install certbot
yum install certbot
# create cert folder
mkdir -p /usr/local/openresty/nginx/html/.well-known/acme-challenge
# configure nginx
```nginx
location ^~ /.well-known/acme-challenge/ {
default_type "text/plain";
You can’t perform that action at this time.