Skip to content

Instantly share code, notes, and snippets.

View 521xueweihan's full-sized avatar
:octocat:
me

削微寒 521xueweihan

:octocat:
me
View GitHub Profile
@521xueweihan
521xueweihan / portforwarding.md
Created December 25, 2016 14:49 — forked from kujohn/portforwarding.md
Port forwarding in Mavericks

Port Forwarding in Mavericks


Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.

####1. anchor file Create an anchor file under /etc/pf.anchors/<anchor file> with your redirection rule like:

@521xueweihan
521xueweihan / deploy-flask-gunicorn-supervisor-nginx.md
Created April 7, 2017 15:05 — forked from binderclip/deploy-flask-gunicorn-supervisor-nginx.md
Flask Gunicorn Supervisor Nginx 项目部署小总结

Flask Gunicorn Supervisor Nginx 项目部署小总结

服务器的基本连接和配置

SSH 连接

使用公钥私钥来登陆而不是账号密码,公钥私钥需要简单的在本地生成一下。Github 的生成 SSH 公钥私钥的教程:Generating SSH keys

可能需要使用 -i 参数选择一下本地的私钥,一个示例的 ssh 连接如下:

@521xueweihan
521xueweihan / fix-missing-libcrypto-osx.md
Last active August 6, 2020 04:04 — forked from aklap/fix-missing-libcrypto-osx.md
Resolving missing link to libcrypto/openssl on OSX
brew uninstall --ignore-dependencies openssl
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/30fd2b68feb458656c2da2b91e577960b11c42f4/Formula/openssl.rb
@521xueweihan
521xueweihan / Dockerfile
Created September 28, 2020 08:55 — forked from twang2218/Dockerfile
Docker cron example
FROM python:3.5.2
ENV TZ=Asia/Shanghai
RUN apt-get update \
&& apt-get install -y cron \
&& apt-get autoremove -y
COPY ./cronpy /etc/cron.d/cronpy
CMD ["cron", "-f"]
@521xueweihan
521xueweihan / web-servers.md
Created November 25, 2020 02:45 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000