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 / download.sh
Created May 22, 2017
Clone a folder from github repo
View download.sh
# Use `Github Contents API` to fetch a archive tarball for a repository.
# And use `curl` to strip it.
# curl https://codeload.github.com/[user_or_org]/[repo]/tar.gz/master | \
# tar -xz --strip=2 [repo]-master/[subfolder]
# Take `next.js/examples/with-apollo` folder for example:
curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/with-apollo
@chuyik
chuyik / install.sh
Last active May 10, 2017
compile mendsley/bsdiff on Mac/Linux
View install.sh
git clone https://github.com/mendsley/bsdiff.git
cd bsdiff
./autogen.sh
./configure
make && make install
## default bsdiff and bspatch location: /usr/local/bin
@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";
@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 / install.sh
Last active Sep 17, 2019
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/
@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 / node_in_production.md
Last active Jun 1, 2016
Node 生产环境调试
View node_in_production.md

Node 专题索引

  • Node 生产环境调试
  • Node 安全(待编)
  • Node 部署(待编)

本文以问答的形式,介绍生产环境中该如何去调试 Node 应用。
文章覆盖到了性能问题崩溃问题内存泄露的检查和解决手段。

随着用户请求数越来越多,Node 请求越来越慢。怎么处理?

@chuyik
chuyik / svn-pristine-find.sh
Last active Sep 6, 2015 — forked from mcbrwr/svn-pristine-find.sh
fix for "svn pristine text not present" error in a working copy
View svn-pristine-find.sh
#!/bin/bash
# for an "svn pristine text not present" error like this:
# svn: E155010: Pristine text 'd6612ee6af5d9fb4459cbe7e2e8e18f7fb4201f8' not present
# you can delete the file and retrieve it with svn up
# (if you have local modifications, make up your own plan)
# -
# Run this script from the root of the working copy.
# It retrieves the file that's causing the error from wc.db
# usage example : ./svn-pristine-find.sh d6612ee6af5d9fb4459cbe7e2e8e18f7fb4201f8
View dabblet.css
.wrap {}
.btn {padding: 10px;}
.up:active ~ .char {
margin-top: -84px;
}
.down:active ~ .char {
margin-top: 84px;
}
View urls
动画和HTML5游戏引擎
视频库
http://www.videojs.com/
http://mediaelementjs.com/
大数据图形化
http://echarts.baidu.com/
http://www.highcharts.com/
绘图
You can’t perform that action at this time.